List devices
List all devices in the specified region. By default, returned devices are ordered by creation date in ascending order, though this can be modified via the order_by field.
path Parameters
regionThe region you want to target
query Parameters
pagePage number to return, from the paginated results.
page_sizeNumber of devices to return within a page. Maximum value is 100.
order_byOrdering of requested devices.
nameName to filter for, only devices with this name will be returned.
hub_idHub ID to filter for, only devices attached to this Hub will be returned.
allow_insecureDefines whether to filter the allow_insecure flag.
statusDevice status (enabled, disabled, etc.).
List devices › Responses
total_countTotal number of devices.
Page of devices.
Add a device
Attach a device to a given Hub.
path Parameters
regionThe region you want to target
Add a device › Request Body
nameDevice name.
hub_idHub ID of the device.
allow_insecureDefines whether to allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones.
allow_multiple_connectionsDefines whether to allow multiple physical devices to connect with this device's credentials.
Filter-sets to authorize or deny the device to publish/subscribe to specific topics.
descriptionDevice description.
Add a device › Responses
Information related to the created device.
Device certificate.
Get a device
Retrieve information about an existing device, specified by its device ID. Its full details, including name, status and ID, are returned in the response object.
path Parameters
regionThe region you want to target
device_idDevice ID.
Get a device › Responses
idDevice ID, also used as MQTT Client ID or username.
nameDevice name.
descriptionDevice description.
statusDevice status.
hub_idHub ID.
last_activity_atLast connection/activity date of a device. (RFC 3339 format)
is_connectedDefines whether the device is connected to the Hub.
allow_insecureDefines whether to allow the device to connect to the Hub without TLS mutual authentication.
allow_multiple_connectionsDefines whether to allow multiple physical devices to connect to the Hub with this device's credentials.
Filter-sets to restrict the topics the device can publish/subscribe to.
has_custom_certificateDefines whether the device was assigned a custom certificate. Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
created_atDate at which the device was added. (RFC 3339 format)
updated_atDate at which the device was last modified. (RFC 3339 format)
regionRegion of the device.
Update a device
Update the parameters of an existing device, specified by its device ID.
path Parameters
regionThe region you want to target
device_idDevice ID.
Update a device › Request Body
descriptionDescription for the device.
allow_insecureDefines whether to allow plain and server-authenticated SSL connections in addition to mutually-authenticated ones.
allow_multiple_connectionsDefines whether to allow multiple physical devices to connect with this device's credentials.
Filter-sets to restrict the topics the device can publish/subscribe to.
hub_idChange Hub for this device, additional fees may apply, see IoT Hub pricing.
Update a device › Responses
idDevice ID, also used as MQTT Client ID or username.
nameDevice name.
descriptionDevice description.
statusDevice status.
hub_idHub ID.
last_activity_atLast connection/activity date of a device. (RFC 3339 format)
is_connectedDefines whether the device is connected to the Hub.
allow_insecureDefines whether to allow the device to connect to the Hub without TLS mutual authentication.
allow_multiple_connectionsDefines whether to allow multiple physical devices to connect to the Hub with this device's credentials.
Filter-sets to restrict the topics the device can publish/subscribe to.
has_custom_certificateDefines whether the device was assigned a custom certificate. Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
created_atDate at which the device was added. (RFC 3339 format)
updated_atDate at which the device was last modified. (RFC 3339 format)
regionRegion of the device.
Get a device's certificate
Get information for a particular PEM-encoded certificate, specified by the device ID. The response returns full details of the device, including its type of certificate.
path Parameters
regionThe region you want to target
device_idDevice ID.
Get a device's certificate › Responses
Information related to the created device.
certificate_pemDevice certificate.
Set a custom certificate on a device
Switch the existing certificate of a given device with an EM-encoded custom certificate.
path Parameters
regionThe region you want to target
device_idDevice ID.
Set a custom certificate on a device › Request Body
certificate_pemPEM-encoded custom certificate.
Set a custom certificate on a device › Responses
certificate_pemDisable a device
Disable an existing device, specified by its device ID.
path Parameters
regionThe region you want to target
device_idDevice ID.
Disable a device › Responses
idDevice ID, also used as MQTT Client ID or username.
nameDevice name.
descriptionDevice description.
statusDevice status.
hub_idHub ID.
last_activity_atLast connection/activity date of a device. (RFC 3339 format)
is_connectedDefines whether the device is connected to the Hub.
allow_insecureDefines whether to allow the device to connect to the Hub without TLS mutual authentication.
allow_multiple_connectionsDefines whether to allow multiple physical devices to connect to the Hub with this device's credentials.
Filter-sets to restrict the topics the device can publish/subscribe to.
has_custom_certificateDefines whether the device was assigned a custom certificate. Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
created_atDate at which the device was added. (RFC 3339 format)
updated_atDate at which the device was last modified. (RFC 3339 format)
regionRegion of the device.
Enable a device
Enable a specific device, specified by its device ID.
path Parameters
regionThe region you want to target
device_idDevice ID.
Enable a device › Responses
idDevice ID, also used as MQTT Client ID or username.
nameDevice name.
descriptionDevice description.
statusDevice status.
hub_idHub ID.
last_activity_atLast connection/activity date of a device. (RFC 3339 format)
is_connectedDefines whether the device is connected to the Hub.
allow_insecureDefines whether to allow the device to connect to the Hub without TLS mutual authentication.
allow_multiple_connectionsDefines whether to allow multiple physical devices to connect to the Hub with this device's credentials.
Filter-sets to restrict the topics the device can publish/subscribe to.
has_custom_certificateDefines whether the device was assigned a custom certificate. Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
created_atDate at which the device was added. (RFC 3339 format)
updated_atDate at which the device was last modified. (RFC 3339 format)
regionRegion of the device.
Get a device's metrics
Get the metrics of an existing device, specified by its device ID.
path Parameters
regionThe region you want to target
device_idDevice ID.
query Parameters
start_dateStart date used to compute the best scale for the returned metrics. (RFC 3339 format)
Get a device's metrics › Responses
Metrics for a device over the requested period.
Renew a device certificate
Renew the certificate of an existing device, specified by its device ID.
path Parameters
regionThe region you want to target
device_idDevice ID.
Renew a device certificate › Responses
Information related to the created device.
Device certificate.