Device Api

Operations

Bulk Device Operation

Create, update, or delete the identities of multiple devices from the IoT hub identity registry. Create, update, or delete the identiies of multiple devices from the IoT hub identity registry. A device identity can be specified only once in the list. Different operations (create, update, delete) on different devices are allowed. A maximum of 100 devices can be specified per invocation. For large scale operations, consider using the import feature using blob storage(https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities).

Delete Device

Delete the identity of a device from the identity registry of an IoT hub. Delete the identity of a device from the identity registry of an IoT hub. This request requires the If-Match header. The client may specify the ETag for the device identity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The delete operation is performed only if the ETag sent by the client matches the value maintained by the server, indicating that the device identity has not been modified since it was retrieved by the client. To force an unconditional delete, set If-Match to the wildcard character (*).

Get Device

Retrieve a device from the identity registry of an IoT hub.

Get Devices

Get the identities of multiple devices from the IoT hub identity registry. Get the identities of multiple devices from the IoT hub identity registry. Returns the specified number of devices from the IoT hub's identity registry. If a limit is not specified, it returns up to 1000 identities. Pagination of device identities is not supported. This API is targeted at development and test scenarios. For large scale operations, consider using the export feature using blob storage(https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities)

Get Registry Statistics

Retrieves statistics about device identities in the IoT hub’s identity registry. Retrieves statistics about device identities in the IoT hub’s identity registry. The body contains the total number of device identities and a breakdown of the number of devices that are enabled and disabled.

Get Service Statistics

Retrieves service statistics for this IoT hub’s identity registry. Retrieves service statistics for this IoT hub’s identity registry. This returns the total number of devices currently connected to an IoT hub.

Purge Command Queue

Delete all the pending commands for this device from the IoT hub.

Put Device

Create or update the identity of a device in the identity registry of an IoT hub. Create or update the identity of a device in the identity registry of an IoT hub. An ETag must not be specified for the create operation. An ETag must be specified for the update operation. Note that generationId and deviceId cannot be updated by the user.

Query Devices

Query an IoT hub to retrieve information regarding device twins using a SQL-like language. Query an IoT hub to retrieve information regarding device twins using a SQL-like language. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information. Pagination of results is supported. This returns information about device twins only.