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.
curl "https://api.therealer.com/iot/v1/devices/12345/commands" \
-H 'Authorization: Bearer b11db7f6c816568eb3b156df3aeaa5'
Retrieve all commands registered for the authenticated control device.
The Bearer access token obtained from the OAuth token endpoint.
Type: String
Example: Bearer b11db7f6c816568eb3b156df3aeaa5
ID (id) of the authenticated control device.
Type: Integer
Example: 12345
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.
Retrieve one command. The response keeps the same array-based commands payload shape.
curl "https://api.therealer.com/iot/v1/devices/12345/sensors" \
-H 'Authorization: Bearer b11db7f6c816568eb3b156df3aeaa5'
Retrieve all sensors registered for the authenticated control device.
The Bearer access token obtained from the OAuth token endpoint.
Type: String
Example: Bearer b11db7f6c816568eb3b156df3aeaa5
ID (id) of the authenticated control device.
Type: Integer
Example: 12345
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.
Retrieve one sensor. The response keeps the same array-based sensors payload shape.