Robot API
Describes RESTful API for operation with a Robot
{id}
{id}
{id}
{id}
Path variables
It identifies the Robot and should be GUID in uppercase without brackets and without hyphens
Responses
Body
id = “68215FEBA95140EEA53F848A0413C402”
GET /robot/68215FEBA95140EEA53F848A0413C402 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "Dog",
"legSequence": [0,3,2,1],
"id": "68215FEBA95140EEA53F848A0413C402"
}
Request body
Examples
A new Robot with id “68215FEBA95140EEA53F848A0413C402” will be saved to database
{
"name": "Dog",
"legSequence": [0,3,2,1],
"id": "68215FEBA95140EEA53F848A0413C402"
}
Responses
New Robot with id = “68215FEBA95140EEA53F848A0413C402” will be posted into database
POST /robot/ HTTP/1.1
Content-Type: application/json
{
"name": "Dog",
"legSequence": [0,3,2,1],
"id": "68215FEBA95140EEA53F848A0413C402"
}
HTTP/1.1 204 No Content
{id}
Path variables
It identifies the Robot and should be GUID in uppercase without brackets and without hyphens
Request body
Responses
This request updates a Robot with id = “68215FEBA95140EEA53F848A0413C402”
PUT /robot/68215FEBA95140EEA53F848A0413C402 HTTP/1.1
Content-Type: application/json
{
"id": "68215FEBA95140EEA53F848A0413C402",
"name": "Dog",
"legSequence": [0,3,2,1]
}
HTTP/1.1 204 No Content
{id}
Path variables
It identifies the Robot and should be GUID in uppercase without brackets and without hyphens
Responses
The request deletes a Robot with id = “68215FEBA95140EEA53F848A0413C402”
DELETE /robot/68215FEBA95140EEA53F848A0413C402 HTTP/1.1
HTTP/1.1 204 No Content
You can move Robot’s legs, that will change a Robot position. Also you can reset a Robot’s position and get Robot’s state. This section describes RESTful API for those operations.
{id}
/stateThe Robot json object. Used in CRUD operation with a Robot.
{
"name": "Dog",
"legSequence": [0,3,2,1],
"id": "68215FEBA95140EEA53F848A0413C402"
}
It identifies the Robot and should be GUID in uppercase without brackets and without hyphens
This is a humanreadable name of the Robot
Legs sequence for Robot moving. That should be a json array