Skip to content

Devices

A user’s devices.

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/device/{userId}/{uuid}
Parameter In Type Required Description
uuid path string Yes
userId path string Yes
type query string No type == null or == 0, get Device by uuid else type == 1, get Device item by mac
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/device/<userId>/<uuid>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
{
"uuid": "string",
"mac": "string",
"rootUuid": "string",
"label": "string",
"desc": "string",
"productId": "string",
"features": [
0
],
"firmCode": -1,
"firmVer": "string",
"groupId": "string",
"vgroupId": "string",
"userId": "string",
"locationId": "string",
"partnerId": "string",
"elementIds": [
0
],
"fav": true,
"productInfos": [
0
],
"elementInfos": {},
"cdev": 0,
"endpoint": "string",
"link": 0,
"linkId": "string",
"serial": "string",
"licenseId": "string"
}

Get User’s list entire devices or devices in a location

Section titled “Get User’s list entire devices or devices in a location”
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/device/{userId}

locationId = undefined then return list entire devices

Parameter In Type Required Description
userId path string Yes
locationId query string No
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/device/<userId>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
[
{
"uuid": "string",
"mac": "string",
"rootUuid": "string",
"label": "string",
"desc": "string",
"productId": "string",
"features": [
0
],
"firmCode": -1,
"firmVer": "string",
"groupId": "string",
"vgroupId": "string",
"userId": "string",
"locationId": "string",
"partnerId": "string",
"elementIds": [
0
],
"fav": true,
"productInfos": [
0
],
"elementInfos": {},
"cdev": 0,
"endpoint": "string",
"link": 0,
"linkId": "string",
"serial": "string",
"licenseId": "string"
}
]
PATCH https://openapi.rogo.com.vn/api/v2.0/iot-core/device/{userId}
Parameter In Type Required Description
userId path string Yes

Body

Field Type Required Description
uuid string Yes
label string Yes
desc string Yes
groupId string Yes
vgroupId string Yes
fav boolean Yes
elementInfos object Yes
Terminal window
curl -X PATCH "https://openapi.rogo.com.vn/api/v2.0/iot-core/device/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"uuid":"string","label":"string","desc":"string","groupId":"string","vgroupId":"string","fav":true,"elementInfos":{}}'
Status Meaning
200 Success update devices
default
DELETE https://openapi.rogo.com.vn/api/v2.0/iot-core/device/{userId}
Parameter In Type Required Description
userId path string Yes

Body

Field Type Required Description
uuid string No
Terminal window
curl -X DELETE "https://openapi.rogo.com.vn/api/v2.0/iot-core/device/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"uuid":"string"}'
Status Meaning
200 Success delete device
default