Run and switch smart scenes.
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/smart/{userId}
| Parameter |
In |
Type |
Required |
Description |
userId |
path |
string |
Yes |
|
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/<userId>" \
-H "x-header-apikey: $API_KEY"
Example answer
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/{userId}/{uuid}
| Parameter |
In |
Type |
Required |
Description |
userId |
path |
string |
Yes |
|
uuid |
path |
string |
Yes |
|
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/<userId>/<uuid>" \
-H "x-header-apikey: $API_KEY"
Example answer
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/active
Activate a smart by smid and locId
Body
| Field |
Type |
Required |
Description |
smid |
number |
Yes |
|
locId |
string |
Yes |
|
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/active" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"smid":0,"locId":"string"}'
| Status |
Meaning |
| 200 |
Activation successful |
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/set-mode
0 = enable (default), 2 = disable. Syncs the owned schedule.
Body
| Field |
Type |
Required |
Description |
userId |
string |
Yes |
|
uuid |
string |
Yes |
|
mode |
0 \ |
2 |
Yes |
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/smart/set-mode" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"userId":"string","uuid":"string","mode":0}'
Example answer