Device state
The last state each device reported.
Every call needs the project’s API key in x-header-apikey. See Authentication. Errors use the codes in Error codes.
Get state by device ID
Section titled “Get state by device ID”GET https://openapi.rogo.com.vn/api/v2.0/iot-core/state/devId/{devId}| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
devId |
path | string | Yes |
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/state/devId/<devId>" \ -H "x-header-apikey: $API_KEY"| Status | Meaning |
|---|---|
| 200 | Return state by device ID |
Example answer
{ "uuid": "string", "loc": "string", "mac": "string", "from": "string", "state": {}, "time": "2026-12-03T00:00:00.000Z", "prevState": {}, "devId": "string"}Get all states by location UUID
Section titled “Get all states by location UUID”GET https://openapi.rogo.com.vn/api/v2.0/iot-core/state/{locationUuid}| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
locationUuid |
path | string | Yes |
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/state/<locationUuid>" \ -H "x-header-apikey: $API_KEY"| Status | Meaning |
|---|---|
| 200 | Return all states |
Example answer
[ { "uuid": "string", "loc": "string", "mac": "string", "from": "string", "state": {}, "time": "2026-12-03T00:00:00.000Z", "prevState": {}, "devId": "string" }]Get single state by location UUID and MAC device
Section titled “Get single state by location UUID and MAC device”GET https://openapi.rogo.com.vn/api/v2.0/iot-core/state/{locationUuid}/{macDevice}| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
locationUuid |
path | string | Yes | |
macDevice |
path | string | Yes |
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/state/<locationUuid>/<macDevice>" \ -H "x-header-apikey: $API_KEY"| Status | Meaning |
|---|---|
| 200 | Return single state |
Example answer
{ "uuid": "string", "loc": "string", "mac": "string", "from": "string", "state": {}, "time": "2026-12-03T00:00:00.000Z", "prevState": {}, "devId": "string"}