NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)

 GET /template id?N/A Jsonform template

 POST

 /json N/AForm 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/AjobJob data in JSON formatN/A
GET


/taskjob
task_idN/A

Examples of /Tasks

Code Block
languagebash
titleExample of POSTing a task
$ 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
languagebash
titleGET /job/:id
curl http://localhost/job/3
Code Block
languagebash
titleExample of GETting status of a task
{"id":"3","type":"queue","data":{},"priority":-10,"progress":"100","state":"complete","attempts":null,"created_at":"1309973155248","updated_at":"1309973155248","duration":"15002"}

 Examples here