Skip to content

Groups

Rooms and other groups of devices inside a location.

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/group/{userId}/{uuid}
Parameter In Type Required Description
uuid path string Yes
userId path string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/group/<userId>/<uuid>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
{
"uuid": "string",
"label": "string",
"desc": "string",
"userId": "string",
"locationId": "string",
"type": 0,
"elementId": 0
}
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/group/{userId}
Parameter In Type Required Description
locationId query string No if locationId input null in params, auto get all group from this user
userId path string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/group/<userId>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
[
{
"uuid": "string",
"label": "string",
"desc": "string",
"userId": "string",
"locationId": "string",
"type": 0,
"elementId": 0
}
]
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/group/{userId}
Parameter In Type Required Description
userId path string Yes

Body

Field Type Required Description
label string Yes
locationId string Yes
desc string Yes
type number Yes if type is null, default = 0, if not null, type is only value between 0 - 1
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/group/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"label":"string","locationId":"string","desc":"string","type":0}'
Status Meaning
default
PATCH https://openapi.rogo.com.vn/api/v2.0/iot-core/group/{userId}
Parameter In Type Required Description
userId path string Yes

Body

Field Type Required Description
uuid string Yes
label string Yes
desc string Yes
Terminal window
curl -X PATCH "https://openapi.rogo.com.vn/api/v2.0/iot-core/group/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"uuid":"string","label":"string","desc":"string"}'
Status Meaning
200
Example answer
{
"uuid": "string",
"success": true
}
DELETE https://openapi.rogo.com.vn/api/v2.0/iot-core/group/{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/group/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"uuid":"string"}'
Status Meaning
200
Example answer
{
"uuid": "string",
"success": true
}