v1/devices
Use the v1/devices API to create, modify, delete, or get devices. The API also includes options for getting data (channel), management, and metrics data streams.
URI
http://<hostname>/ws/v1/devices
Formats
HTTP method | Format | Description | Parameters |
---|---|---|---|
GET | /ws/v1/devices | Get summary of the device APIs. | None |
GET | /ws/v1/devices/bulk | Get a list of all devices in CSV format. | group child_groups orderby tag type address name query fields |
POST | /ws/v1/devices/bulk | Create a batch of users. | Update |
GET | /ws/v1/devices/channel/{id} | Get a list of data channels for a device. | None |
GET | /ws/v1/devices/channel/{id}/{name} | Get a specific data channel for a device. | None |
GET | /ws/v1/devices/inventory | List devices. | group child_groups size cursor order orderby tag type address name query |
GET | /ws/v1/devices/inventory/config/{configId} | List devices managed by a config. | group child_groups size cursor order orderby tag type address name query |
POST | /ws/v1/devices/inventory | Create or modify devices. | bundle_device |
DELETE | /ws/v1/devices/inventory | Delete devices. | tag, type, address, name |
GET, DELETE | /ws/v1/devices/inventory/{id} | Get or delete a specific device. | |
PUT | /ws/v1/devices/inventory/{id} | Update a specific device. | update_only allow_swap |
GET | /ws/v1/devices/management/{id} | Get a list of management streams for a device. | None |
GET | /ws/v1/devices/management/{id}/{name} | Get a specific management stream for a device. | None |
GET | /ws/v1/devices/metrics/{id} | Get a list of health metrics for a device. | None |
GET | /ws/v1/devices/metrics/{id}/{name} | Get a specific health metric for a device. | None |
GET | /ws/v1/devices/types | Get a list of device types. | None |
Device fields
address
Device address supplied by the device.
alerts
Total number of fired alerts for the device.
capabilities
Capabilities to enable for the device (write-only):
Capability | Description |
---|---|
sm_compression_available | Allow compression to be used for SM requests: true or false. |
sm_pack_available | Allow pack commands to be sent to the device (multiple commands in a single datagram): true or false. |
sm_battery_operated | Send requests to the device in battery-operated mode: true or false. |
sm_udp_enabled | Enable SM/UDP for the device: true or false. |
channels_uri
Full path to channel data.
carrier/carrier2
The reported network carrier for the primary and 2nd cellular signals.
connection_status
Keyword that indicates the connection status of the device: connected or disconnected.
description
String that describes the device.
extended_address
XBee radio EUI64 extended address for the device.
firmware_version
String that indicates the firmware version of the device.
group
Group path for the device.
id
System-generated identifier for the device.
install_code
Installation code for the device. An installation code is required for any device manufactured with an associated installation code.
- If you attempt to add a device that requires an installation code with a missing or incorrect code, you receive an HTTP status 400 error code along with a message describing the error.
- If you are adding multiple devices and one or more of the device installation code is missing or incorrect, you receive an HTTP status 207 error along with a message describing the error.
ip
Local IP address of the device.
last_connect
Date and time the device last connected to Remote Manager in ISO 8601 format.
last_disconnect
Date and time the device last disconnected from Remote Manager in ISO 8601 format.
last_disconnect_reason
Reason the device last disconnected from Remote Manager, if known.
last_update
Date and time the device was last updated in ISO ISO 8601 format.
mac
MAC address of the device.
management_uri
Full path to management data.
metrics_uri
Full path to metrics data.
notes
String that provide notes for the device (formerly user meta data).
parent
System-generated identifier for the parent device.
password
Password for the device (write-only).
provider/provider2
The reported SIM provider for the primary and 2nd cellular SIMs
public_ip
Public IP address of device (formerly called global IP).
restricted_status
Keyword that indicates the restriction status of the device: unrestricted, disabled, restricted, or untrusted.
serial_number
Serial number of the device.
signal_percent
Percent of the primary cellular signal.
signal_percent2
Percent of the 2nd cellular signal.
signal_quality
Signal quality of the primary cellular signal.
signal_quality2
Signal quality of the 2nd cellular signal.
signal_strength
Signal strenth of the primary cellular signal.
signal_strenth2
Signal strength of the 2nd cellular signal.
tags
An array of tags associated with the device.
type
String that indicates the device type for the device.
vendor_id
Vendor identifier assigned to the device.
Channel, management, and metric fields
id
System-generated identifier for the device.
name
Name for the data channel.
value
Current value of the channel.
units
Units for the channel value.
timestamp
Time the current value was reported (ISO 8601 standard format).
history_uri
URI to the history of channel values (in streams).
customer_id
Identifier for the customer that owns the data.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
tag | string | Query devices with matching tags. | (tag | type | address) Use only one per request. |
type | string | Query devices by type. | |
address | string | Query devices by address. | |
cursor | string | Cursor to get the next page of devices. Omit on initial call. | |
fields | string | Comma-separated list of fields to return for bulk API | |
size | integer | Number of itmes to return. The maximum and default is 1000. |