TIBCO Spotfire® Statistics Services URL API

jobs

jobs replaces the deprecated non-RESTful functions getJobDetails and getJobs.

Parameters

userId
The identifier (login name) of the user whose jobs you want to see.
jobID
The job identifier
status
The job status. See Remarks for more information.
textOutput
When combined with jobID, provides any text output returned by the server.

Return value

Returns an SPXML string containing a list of jobs on the server. If you specify jobID, this resource returns an SPXML string containing the details of an individual job.

Remarks

An existing job can have a status of one of the following:

Status Code
interrupted -2
failed -1
waiting to start 0
running 1
done 2
done with error 3

Deleted jobs are not considered existing jobs.

If your server administrator has installed a style sheet, the results are returned in the browser window in the format specified by the style sheet. For example:


getJobs report

If your server administrator has not included the style sheet, the results of this request displays the top-level tag of the job, the SplusDataResult as SPXML. (if you do not see the SPXML, right-click your browser, and then click View Source).

Examples

The following link retrieves all jobs currently stored on the server:

http://servername:8080/SplusServer/api/v8/jobs

The following link retrieves the details of the specified job:

http://servername:8080/SplusServer/api/v8/jobs/202

Retrieving jobs by job ID displays the SPXML for the specified job. See SPXML output reference for an example.

The following link retrieves the text ID of the specified job:

http://servername:8080/SplusServer/api/v8/jobs/353/textOutput

Retrieving jobs by job ID and textOutput displays the text output for the specified job. This can be useful for jobs that finish with error. For example:

Problem in sleep: argument character(0)= not matched: sleep("character(0)" = 20) 
Use traceback() to see the call stack
8: eval(action, sys.parent())
7: doErrorAction("Problem in sleep: argument character(0)= not matched: sleep(\"character(0)\" = 20)",
6: sleep("character(0)" = 20)
5: eval(this.call, local = sys.parent(1.))
4: do.call(fn.name, args = arg.list)
3: .spserver.internal.eval.function("sleep", "", 1)
2: eval(expression(.spserver.internal.eval.function("sleep", "", 1)))
1: 
Message: Problem in sleep: argument character(0)= not matched: sleep("character(0)" = 20) 
Note: You can combine resources to retrieve job(s).