Previous: REST Sessions, Up: REST API [Contents][Index]
Rest API for performing asynchronous jobs as part of sel
.
It attempts to conform to principals described here: Representational State Transfer
The Rest API leverages a number of Common Lisp components, which
are open-source and generally available via Quicklisp. See the core REST
file for a full description and how to start a rest server. In addition,
this file is built from the session and standard library definitions for
REST provided as part of sel
.
This file provides the following:
The following types of resources are supported.
Any long running operation which starts a task and returns to the client immediately. Examples of jobs include running evolutions, fitness tests across large populations, and searches.
Note: asynchronous job management requires a cid
(Client ID) integer
value representing the Client id
for session lookup. See the client
sessions file for endpoint usage to acquire one.
Async-Job:
post
<service-base>/async?cid=<cid>?type=<job-type>
Body
contains (json)
parameters for evolve
task, fitness-test
or
other defined type of task. Returns immediately with a
Job-ID (jid). Creating a Job starts a task (on a new
thread) which will execute until stopped or completed.
get
<service-base>/async?cid=<cid>?jid=<Job-ID>
Returns JSON
containing job status and results.
put
<service-base>/async?cid=<cid>?jid=<Job-ID>&<update-vars>
Allows some control of the task, such as stopping the task.
(Currently not implemented.)