REST¶
This pages describes the general part of the used rest api.
Request¶
A command request look in general like:
{
"cmdName": "[commandName]",
"payload": "[payload]",
"payloadType": "[payloadType]",
"auth": {
"realm": "ecouser.net",
"resource": "[resource]",
"token": "[token]",
"userid": "[userid]",
"with": "users"
},
"td": "q",
"toId": "[toId]",
"toRes": "[toRes]",
"toType": "[toType]"
}
Description¶
cmdName
: command namepayload
: command request object. Will be described in the respective payload type-
payloadType
:Value Description x xml j json
auth
: the authentication object-
td
: Specifier if request or responseValue Description q request
toId
: Did of vacuumtoRes
: Resource of vacuumtoType
: class (model) of vacuum (e.g.ls1ok3
)
Response¶
In general a response looks like:
{
"id": "[id]",
"ret": "ok",
"resp": "[Command response]"
}
Description¶
id
: Request id-
ret
: statusValue Description ok command response was retrieved successfully from vacuum fail some error happen. e.g. vacuum did not respond
resp
: command response. Can be missing if the command is only executing something. Will be described in the respective payload type