SLiMSuite REST Server
SLiMSuite REST Help
Programmatic access to SLiMSuite REST services
By default, the REST services return human-readable HTML when queued or running. Default output is formatted
full server output.
Individual components can be accessed in plain text using
X is the
chosen server output. Details of server output can be found in the main Help page for universal outputs, or
by running the chosen program with
&rest=outfmt. REST outputs are also listed in the main documentation for the
program, accessed with
However, even when plain text output is being required, the main program run may still need to go into a queue and/or
may take several minutes to complete. To avoid proxy timeouts, these outputs will still go via a human-readable intermediate queue page.
Programmatic access is therefore a three step process:
Set the job going and retrieve the
JobID by calling the program with
&rest=jobid. This will return the job ID in
the form of an 11-digit number, e.g.
Check the progress of your job using
X is the job ID returned in step 1. This will return
Finished, dependent on the status of the job. If something has gone wrong,
Failed will be
returned. Please cycle and check periodically until
Finished is return. We request that you do not make this cycle
period too short - once every few seconds/minutes (depending on the job) is recommended.
Finished, retrieve the desired output using
retrieve&jobid=X&rest=X. To get all outputs, use
SLiMParser can be used to split the full output into separate files if desired.
If there is a problem, the output should start with
Note: By default, jobs are unprotected. To eliminate the risk of other users retrieving your jobs, you can add
&password=X to each of these calls.
SLiMParser can also be used to execute this process in full:
python SLIMSUITEPATH/tools/slimparser.py restin="RESTURL" restout=T restoutdir=PATH
Note: The double quotes around
RESTURL are important. Without them, a truncated URL will be sent to
SLiMParser, which will be set to run in the background due to the `&` in the URL.
Please visit http://slimsuite.blogspot.com.au or email firstname.lastname@example.org.
© 2015 RJ Edwards. Contact: email@example.com.