Create a Device
post
/api/device/Devices
Creates a new device.
For physical devices, at minimum, you must specify either the Custom Name, DNS Name, IPv4 or IPv6 address.
For virtual devices, IP address and DNS name are not used. Only Custom Name and Parent Device are required.
The minimum required properties in the request body are:
For physical devices, at minimum, you must specify either the Custom Name, DNS Name, IPv4 or IPv6 address.
For virtual devices, IP address and DNS name are not used. Only Custom Name and Parent Device are required.
The minimum required properties in the request body are:
- DeviceStateID
- DNSName
- For virtual devices (when DeviceStateID is set to 102):
- CustomName
- Either of the following:
- ParentDeviceName
- ParentDeviceID
- For physical devices, any of the following:
- Custom Name
- DNS Name
- IPAddress
- IPv6Address
- DevicePriorityID
- DeviceZoneID
- DeviceTypeCategoryID
- ShardID (defaults to 1 if not specified, but specify it if you are using database shards)
- MetaData
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
CustomName: string
The device custom name. Sequences of integers optionally prefixed by a sign character, such as 12345, +123, -456, or 0888 are not supported. Hexadecimal, decimal, and exponential expressions are valid and are treated as a name. For example, 0xAD, 123e10, 33.44.
-
DevicePriorityID: integer
The device priority ID.
-
DeviceSNMPAccessID: integer
The SNMP access profile ID.
-
DeviceStateID: integer
Allowed Values:
[ 0, 1, 2, 3, 101, 102 ]The device state ID. Valid values are:- 0: New
- 1: Non-discoverable
- 2: Verified (Discovered)
- 3: Discovered (Fully)
- 101: Static (Disabled)
- 102: Virtual (Non-device)
-
DeviceTypeCategoryID: integer
The device type category ID.
-
DeviceZoneID: integer
The device zone ID.
-
DNSName: string
The device DNS name. Sequences of integers optionally prefixed by a sign character, such as 12345, +123, -456, or 0888 are not supported. Hexadecimal, decimal, and exponential expressions are valid and are treated as a name. For example, 0xAD, 123e10, 33.44.
-
GeoLocation: string
The GeoJSON point of device location (lon, lat).
-
InitialDeviceGroupID: integer
The initial device group ID.
-
IPv4: string
The IPv4 address.
-
IPv6: string
The IPv6 address in hex notation.
-
MetaData: array
MetaData
The metadata object definitions for the device (DeviceMetaTypeID, MetaData).
-
ParentDeviceID: integer
The parent device ID for virtual devices.
-
ShardID: integer
The device shard ID. If database sharding is not configured, it defaults to 1.
Nested Schema : MetaData
Type:
arrayThe metadata object definitions for the device (DeviceMetaTypeID, MetaData).
Show Source
Nested Schema : items
Type:
objectResponse
200 Response
Successful operation
Root Schema : SuccessfulAddOperation
Type:
objectThe response body for a successful add operation.
Show Source
-
message: string
The response message.Example:
Added record -
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
true
Default Response
Failed operation
Root Schema : schema
Type:
Show Source
object-
errors: array
errors
The list of errors reported. Validation errors will be keyed by record field.
-
message: string
The response message.Example:
Exception thrown -
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
false
Nested Schema : errors
Type:
arrayThe list of errors reported. Validation errors will be keyed by record field.
Show Source
-
Array of:
object items
An error.
Nested Schema : items
Type:
objectAn error.