Skip to content
Antonio Vivace edited this page Dec 17, 2018 · 3 revisions

OpenAPI 2.0 definition of CoderBot API v2

Version: 0.2

/restoreSettings


POST

Summary: Restore settings to default

Responses

Code Description
200 ok

/delete


POST

Summary: Delete a program

Parameters

Name Located in Description Required Schema
data body No object

Responses

Code Description
200 ok

/list


GET

Summary: Get the list of all the saved programs

Responses

Code Description
200 ok

/load


GET

Summary: Get the program with the specified name

Parameters

Name Located in Description Required Schema
name query Yes string

Responses

Code Description
200 ok

/saveActivity


POST

Summary: Save a new activity

Parameters

Name Located in Description Required Schema
data body No object

Responses

Code Description
200 ok
400 Failed to save the activity

/updateFromPackage


POST

Parameters

Name Located in Description Required Schema
file_to_upload formData Yes file

Responses

Code Description
200 ok
400 upload failed

/deleteActivity


POST

Summary: Delete an activity

Parameters

Name Located in Description Required Schema
data body No object

Responses

Code Description
200 ok

/listActivities


GET

Summary: Get the list of all the saved activities

Responses

Code Description
200 ok

/loadActivity


GET

Summary: Get the activity with the specified name

Parameters

Name Located in Description Required Schema
name query Yes string

Responses

Code Description
200 ok

/saveProgram


POST

Summary: Save a new program

Parameters

Name Located in Description Required Schema
overwrite query No string
data body No object

Responses

Code Description
200 ok
400 Failed to save the program

/exec


POST

Summary: Execute the given program

Parameters

Name Located in Description Required Schema
data body No object

Responses

Code Description
200 ok

/status


GET

Summary: Bot general informations and execution status

Responses

Code Description
200 Bot status

/info


GET

Summary: Bot general informations and execution status

Responses

Code Description
200 Bot status

/stop


POST

Summary: Stops the bot motors

Responses

Code Description
200 Successfully stopped the motors

/move


POST

Summary: Moves the bot forward or backward.

Parameters

Name Located in Description Required Schema
data body Movement speed and duration No object

Responses

Code Description
200 Sent command to the bot GPIO.

/turn


POST

Summary: Make a turn with the motors

Parameters

Name Located in Description Required Schema
data body Turn No object

Responses

Code Description
200 Sent command to the bot GPIO.