![]() |
Page History
...
HTTP Verb | QueryEndpoint | Query Parameters(Input) | Output(Description) | |
---|---|---|---|---|
GET | /template | id?N/A | Jsonform template | |
POST | /json | N/A | Form in JSON format(see this) | 200 OKN/A |
Examples of /uAIMTemplates
Examples of authoring a JSON form can be seen here
...
Jobs
APIs for posting and retrieving tasks for caMicroscope. It uses Kue(https://github.com/Automattic/kue) to mantain all the tasks. It is well documented.
HTTP Verb | QueryEndpoint | Query Parameters(Input) | Output(Description) |
---|---|---|---|
POST | /taskN/Ajob | Job data in JSON format | N/A |
GET | task_id | N/A |
Examples of /Tasks
Code Block | ||||
---|---|---|---|---|
| ||||
$ curl -H "Content-Type: application/json" -X POST -d \
'{
"type": "order",
"data": {
},
"options" : {
"attempts": 5,
"priority": "high"
}
}' http://localhost:3000/job
|
will output:
{"message": "job created", "id": 3}
This ID can be used to query the status of the job
Code Block | ||||
---|---|---|---|---|
| ||||
curl http://localhost/job/3 |
Code Block | ||||
---|---|---|---|---|
| ||||
{"id":"3","type":"queue","data":{},"priority":-10,"progress":"100","state":"complete","attempts":null,"created_at":"1309973155248","updated_at":"1309973155248","duration":"15002"}
|
Examples here