Service - Get Devices

Get the identities of multiple devices from the IoT hub identity registry. Not recommended. Use the IoT Hub query language to retrieve device twin and device identity information. See https://docs.microsoft.com/en-us/rest/api/iothub/service/queryiothub and https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-query-language for more information.

GET https://fully-qualified-iothubname.azure-devices.net/devices?api-version=2018-06-30
GET https://fully-qualified-iothubname.azure-devices.net/devices?top={top}&api-version=2018-06-30

URI Parameters

Name In Required Type Description
top
query
  • integer
int32

This parameter when specified, defines the maximum number of device identities that are returned. Any value outside the range of 1-1000 is considered to be 1000.

api-version
query True
  • string

Version of the Api.

Responses

Name Type Description
200 OK

OK

Definitions

AuthenticationMechanism
Device
DeviceCapabilities

Status of Capabilities enabled on the device

SymmetricKey
X509Thumbprint

AuthenticationMechanism

Name Type Description
symmetricKey
type enum:
  • certificateAuthority
  • none
  • sas
  • selfSigned
x509Thumbprint

Device

Name Type Description
authentication
capabilities

Status of Capabilities enabled on the device

cloudToDeviceMessageCount
  • integer
connectionState enum:
  • Connected
  • Disconnected
connectionStateUpdatedTime
  • string
deviceId
  • string
etag
  • string
generationId
  • string
lastActivityTime
  • string
status enum:
  • disabled
  • enabled
statusReason
  • string
statusUpdatedTime
  • string

DeviceCapabilities

Status of Capabilities enabled on the device

Name Type Description
iotEdge
  • boolean

SymmetricKey

Name Type Description
primaryKey
  • string
secondaryKey
  • string

X509Thumbprint

Name Type Description
primaryThumbprint
  • string
secondaryThumbprint
  • string