Skip to content

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 https://openapi.rogo.com.vn/api/v2.0/iot-core/state/devId/{devId}
Parameter In Type Required Description
devId path string Yes
Terminal window
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 https://openapi.rogo.com.vn/api/v2.0/iot-core/state/{locationUuid}
Parameter In Type Required Description
locationUuid path string Yes
Terminal window
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
Terminal window
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"
}