Good Life Developers
Home
User Support
Developers API
Search…
Developers API
Developer App
API
Devices List
Devices State
Devices Command
Powered By
GitBook
Devices Command
Send command to user's devices including shared devices.
This API let your app send command to user's devices. Your app can also send command to devices that are shared with user.
post
https://api.goodlife.pk
/v1/devices/command
Devices Command API
Request Format
Send devices and command in JSON body as following format
{
"devices"
:
[
"deviceId-1"
,
"deviceId-2"
],
"command"
:
"on|off"
}
Response Format
Depends upon your request, you will receive API response in JSON format. If there is error then response will be in following format
{"error":1,"msg":"Error detail"}
If there is no error then response will be like following
{
"error"
:
0
,
"devices"
:
[
{
"deviceId-1"
:
{
"online"
:
true
,
"command"
:
true
}
},
{
"deviceId-2"
:
{
"online"
:
true
,
"command"
:
false
}
},
{
"deviceId-3"
:
{
"error"
:
1
,
"msg"
:
"Unknown command 'dummy'"
}
}
]
}
API - Previous
Devices State
Last modified
2yr ago
Copy link
Outline
post
Devices Command API
Request Format
Response Format