Skip to content

Locations

Homes: the top level of 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/location/{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/location/<userId>/<uuid>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
{
"uuid": "string",
"label": "",
"desc": "",
"userId": "string",
"coordinate": [
105.8342,
21.0278
]
}
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/location/{userId}
Parameter In Type Required Description
userId path string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/location/<userId>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
Example answer
[
{
"uuid": "string",
"label": "",
"desc": "",
"userId": "string",
"coordinate": [
105.8342,
21.0278
]
}
]
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/location/{userId}
Parameter In Type Required Description
userId path string Yes

Body

Field Type Required Description
label string Yes
desc string Yes
coordinate number[] No [longitude, latitude]. Omit it when the location has no place on the map yet.
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/location/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"label":"string","desc":"string","coordinate":[105.8342,21.0278]}'
Status Meaning
200
Example answer
{
"uuid": "string",
"label": "",
"desc": "",
"userId": "string",
"coordinate": [
105.8342,
21.0278
]
}
PATCH https://openapi.rogo.com.vn/api/v2.0/iot-core/location/{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/location/<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/location/{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 DELETE "https://openapi.rogo.com.vn/api/v2.0/iot-core/location/<userId>" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"uuid":"string","label":"string","desc":"string"}'
Status Meaning
200