Device catalog

A control device authenticated with OAuth 2.0 Client Credentials Grant can retrieve its command and sensor catalog through the HTTP iot/v1 contract by providing a valid Bearer access token.

Command data describes the actuator state configured through the control panel. Sensor data describes the expected sensor inputs that the device can report through feed-data ingestion.

Commands

cURL

              curl "https://api.therealer.com/iot/v1/devices/12345/commands" \
                -H 'Authorization: Bearer b11db7f6c816568eb3b156df3aeaa5'
            
GET /iot/v1/devices/{device_id}/commands

Retrieve all commands registered for the authenticated control device.

Request headers
Authorization
(required)

The Bearer access token obtained from the OAuth token endpoint.

Type: String

Example: Bearer b11db7f6c816568eb3b156df3aeaa5

Path parameters
device_id
(required)

ID (id) of the authenticated control device.

Type: Integer

Example: 12345

Responses

OK (200)


              {
                "code": 2000,
                "commands": [
                  {
                    "id": 1,
                    "value": "0.0",
                    "value_type": "NumericRange",
                    "kind": "relay",
                    "pin_port": "6"
                  }
                ]
              }
            

If a stored command cannot be represented by the current device contract, the item keeps its id and exposes error instead of command fields.

GET /iot/v1/devices/{device_id}/commands/{id}

Retrieve one command. The response keeps the same array-based commands payload shape.

Sensors

cURL

              curl "https://api.therealer.com/iot/v1/devices/12345/sensors" \
                -H 'Authorization: Bearer b11db7f6c816568eb3b156df3aeaa5'
            
GET /iot/v1/devices/{device_id}/sensors

Retrieve all sensors registered for the authenticated control device.

Request headers
Authorization
(required)

The Bearer access token obtained from the OAuth token endpoint.

Type: String

Example: Bearer b11db7f6c816568eb3b156df3aeaa5

Path parameters
device_id
(required)

ID (id) of the authenticated control device.

Type: Integer

Example: 12345

Responses

OK (200)


              {
                "code": 2000,
                "sensors": [
                  {
                    "id": 1,
                    "kind": "thermistor",
                    "qc": "celsius_temperature",
                    "mu": "degree_celsius:0",
                    "pin_port": "5"
                  }
                ]
              }
            

If a stored sensor cannot be represented by the current device contract, the item keeps its id and exposes error instead of sensor fields.

GET /iot/v1/devices/{device_id}/sensors/{id}

Retrieve one sensor. The response keeps the same array-based sensors payload shape.