Difference between revisions of "SmartJobCenter"
From RobotinoWiki
(→GET methods) |
(→POST methods) |
||
Line 59: | Line 59: | ||
==POST methods== | ==POST methods== | ||
− | ===/ | + | ===/gotoposition=== |
+ | Create a new GotoPosition job. | ||
+ | ====Posted data==== | ||
+ | ;TYPE:JSON | ||
+ | ;Example: | ||
+ | <pre> | ||
+ | { | ||
+ | "robot" : 1, | ||
+ | "position" : 2 | ||
+ | } | ||
+ | </pre> |
Revision as of 14:02, 5 August 2021
Contents
Introduction
REST API to manage jobs and to read job status information. |
GET methods
/jobs
Response
- TYPE
- JSON
- STATUS CODE
- 200 OK
- Example
{ "jobs" : [ { "robot" : 10, "job" : 10, "priority" : 1, "fromstation" : 2, "frombelt" : 1, "tostation" : 3, "tobelt" : 4, "state" : "DRIVING", "life-cycle-state" : "RUNNING" }, { "robot" : 10, "job" : 11, "position" : 2, "state" : "DRIVING", "life-cycle-state" : "RUNNING" } ] }
/jobs/:jobid
Response
- TYPE
- JSON
- STATUS CODE
- If jobid exists 200 OK, else 404 Not Found
- Example
{ "robot" : 10, "job" : 10, "priority" : 1, "fromstation" : 2, "frombelt" : 1, "tostation" : 3, "tobelt" : 4, "state" : "DRIVING", "life-cycle-state" : "RUNNING" }
POST methods
/gotoposition
Create a new GotoPosition job.
Posted data
- TYPE
- JSON
- Example
{ "robot" : 1, "position" : 2 }