-
Notifications
You must be signed in to change notification settings - Fork 17
Cloud API
Weston Schmidt edited this page Dec 21, 2017
·
2 revisions
Below are the supported enpoints, actions and response codes. All payloads are encoded using msgpack.
Only https://github.com/Comcast/xmidt/wiki/Wrp.CRUD messages are accepted/responded to.
This endpoint accepts the msgpack schedule to be applied, and will provide the schedule to callers upon a Retrieve
. The response message is always msgpack encoded and shall be the schedule or a hopefully helpful message.
Either the msgpack encoded schedule, or:
{
"message": "Hooray for everything!"
}
-
message
is the helpful string about the WRP status code
CRUD | WRP Status Code | Description |
---|---|---|
Create |
201 | A new schedule has been created |
Create |
409 | An existing schedule is present - there may be only one. Either: update the schedule -or- delete then create a new one |
Create |
533 | Aker ran into an internal error (possibly due to the formatting of the schedule). |
Retrieve |
200 | The payload contains the existing schedule |
Retrieve |
404 | There is no existing schedule |
Update |
201 | The schedule has been updated |
Update |
534 | Aker ran into an internal error (possibly due to the formatting of the schedule). |
Delete |
200 | Any existing schedule has been deleted |
Delete |
535 | Aker ran into a problem deleting the schedule |
The /aker/now
endpoint provides the list of devices being blocked at this moment in time. This is primarily meant as a debugging or diagnostic tool.
{
"active": "11:22:33:44:55:66",
"time": 1513822552
}
-
active
is the list of blocked devices at the time specified -
time
is the unixtime associated with when this request was processed
CRUD | WRP Status Code | Description |
---|---|---|
Create |
405 | Action not supported |
Retrieve |
200 | The presently blocked devices |
Update |
405 | Action not supported |
Delete |
405 | Action not supported |
Either the msgpack encoded schedule, or:
{
"message": "Hooray for everything!"
}
-
message
is the helpful string about the WRP status code
CRUD | WRP Status Code | Description |
---|---|---|
Any |
400 | Not sure what to do with this request, sorry. |