Devices - Get Properties

Get device properties
Get all property values of a device by device ID.

GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}/properties?api-version=2022-07-31

URI Parameters

Name In Required Type Description
baseDomain
path True

string

The base domain for all Azure IoT Central service requests.

deviceId
path True

string

Unique ID of the device.

subdomain
path True

string

The application subdomain.

api-version
query True

string

The version of the API being called.

Responses

Name Type Description
200 OK

DeviceProperties

Success

Other Status Codes

Error

An error response received from the IoT Central Service.

Headers

x-ms-error-code: string

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get properties

Sample Request

GET https://appsubdomain.azureiotcentral.com/api/devices/mx1/properties?api-version=2022-07-31

Sample Response

{
  "deviceinfo": {
    "manufacturer": "manufacturer",
    "$metadata": {
      "manufacturer": {
        "lastUpdateTime": "2020-07-21T19:06:50.9718608Z"
      },
      "model": {
        "lastUpdateTime": "2020-07-21T19:06:50.9718608Z"
      },
      "swVersion": {
        "lastUpdateTime": "2020-07-21T19:06:50.9718608Z"
      }
    },
    "model": "model",
    "swVersion": "swVersion"
  },
  "settings": {
    "fanSpeed": 12.5,
    "$metadata": {
      "fanSpeed": {
        "desiredValue": 30,
        "desiredVersion": 2,
        "lastUpdateTime": "2020-07-21T19:06:50.9718608Z"
      }
    }
  }
}

Definitions

Name Description
Error

The response error definition.

ErrorDetails

The detail information of the error.

Error

The response error definition.

Name Type Description
error

ErrorDetails

Error details for current request.

ErrorDetails

The detail information of the error.

Name Type Description
code

string

Error code.

message

string

Error message details.

requestId

string

Correlation Id for current request.

time

string

The time that error request failed.