Jobs


Click here for a complete list of operations.

GetJobs

Returns an array of CJJob objects relevant to the conditions parameter.
GetJobs() will only return jobs created by the owner_wsid parameter,
unless owner_wsid has the 'admin' privilege, in which case all jobs are returnable.
The 'conditions' parameter is a specifically formatted string describing which jobs should be retrieved.
At the top level, this parameter is a list of keys, separated by ';'.
Each key set is described by a string key followed by ':' followed by a '|' separated list of conditions.
Each condition may have one of the following possible formats:

VALUE (equality)
VALUE, (equal or greater to VALUE)
,VALUE (less than or equal to VALUE)
V1,V2 (between V1 and V2 (inclusive))

String and DateTime values should not be quoted and may not contain any special characters (:;,|).
DateTime values can be any format that .net will parse, so long as they do not contain any of the above special characters.

The jobs returned are determined by the intersection of the keys, given the union of their conditions

Example 1:
jobid : 12345;
Jobs with a jobid equal to 12345.

Example 2:
jobid : 123|321|132;
Jobs with a jobid equal to 123 or 321 or 132.

Example 3:
jobid : 123|321; status : 5
Jobs with a status of 5 and a jobid of 123 of 321.

Example 4:
jobid : 123,|,122
Returns jobs with id greater or equal to 123 or less than or equal 122 (all of a users jobs).

Example 5:
TimeEnd : 2008-04-5,
All jobs that ended after April 5, 2008.

The following are valid keys:
long JobID : Unique identifier of job
DateTime TimeSubmit : When the job was submitted
DateTime TimeStart : When the job was started
DateTime TimeEnd : When the job completed/cancelled/failed
int Status : Current status of the job. See the GetJobStatus() description for possible Status values.
int Queue : The queue the job ran in.
string TaskName : The user submitted descriptor for the job. This can be null.
string Error : Error message for this job, if any
string Query : The query submitted for this job
string Context : The context of this job
string Type : The type of this job. See GetJobTypes for a listing of possible values.
long WSID : The WebServicesID of the owner of this job. If owner_wsid does not have the 'admin' privilege, then this has no effect.

Parameters:
long owner_wsid : ID of owner of jobs
string owner_pw : Password of said owner.
string conditions : A formatted string describing the conditions for the search. See above for details on this.
bool includeSystem : Determines whether to return system jobs

Output:
CJJob[] : An array of all jobs matching the input conditions.

A CJJob object contains:
long JobID : Unique identifier of job
long Rows : Number of rows this job modified, if applicable
WebServicesID : Identifier of user that submitted this job
DateTime TimeSubmit : When the job was submitted
DateTime TimeStart : When the job was started
DateTime TimeEnd : When the job completed/cancelled/failed
int Status : Current status of the job. See the GetJobStatus() description for possible Status values.
int Queue : The queue the job ran in.
string TaskName : The user submitted descriptor for the job. This can be null.
string OutputLoc : The URL of the output. This field is only non-null for completed jobs where OutputType != Query
string Error : Error message for this job, if any
string Query : The query submitted for this job
string Context : The context of this job
string Type : The type of this job. See GetJobTypes for a listing of possible values.

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
owner_wsid:
owner_pw:
conditions:
includeSystem:

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /gcasjobs/services/jobs.asmx HTTP/1.1
Host: mastweb.stsci.edu
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://Services.Cas.jhu.edu/GetJobs"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetJobs xmlns="http://Services.Cas.jhu.edu">
      <owner_wsid>long</owner_wsid>
      <owner_pw>string</owner_pw>
      <conditions>string</conditions>
      <includeSystem>boolean</includeSystem>
    </GetJobs>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetJobsResponse xmlns="http://Services.Cas.jhu.edu">
      <GetJobsResult>
        <CJJob>
          <JobID>long</JobID>
          <Rows>long</Rows>
          <WebServicesID>long</WebServicesID>
          <TimeSubmit>dateTime</TimeSubmit>
          <TimeStart>dateTime</TimeStart>
          <TimeEnd>dateTime</TimeEnd>
          <Status>int</Status>
          <Queue>int</Queue>
          <TaskName>string</TaskName>
          <OutputLoc>string</OutputLoc>
          <Error>string</Error>
          <Query>string</Query>
          <Context>string</Context>
          <Type>string</Type>
        </CJJob>
        <CJJob>
          <JobID>long</JobID>
          <Rows>long</Rows>
          <WebServicesID>long</WebServicesID>
          <TimeSubmit>dateTime</TimeSubmit>
          <TimeStart>dateTime</TimeStart>
          <TimeEnd>dateTime</TimeEnd>
          <Status>int</Status>
          <Queue>int</Queue>
          <TaskName>string</TaskName>
          <OutputLoc>string</OutputLoc>
          <Error>string</Error>
          <Query>string</Query>
          <Context>string</Context>
          <Type>string</Type>
        </CJJob>
      </GetJobsResult>
    </GetJobsResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /gcasjobs/services/jobs.asmx HTTP/1.1
Host: mastweb.stsci.edu
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetJobs xmlns="http://Services.Cas.jhu.edu">
      <owner_wsid>long</owner_wsid>
      <owner_pw>string</owner_pw>
      <conditions>string</conditions>
      <includeSystem>boolean</includeSystem>
    </GetJobs>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetJobsResponse xmlns="http://Services.Cas.jhu.edu">
      <GetJobsResult>
        <CJJob>
          <JobID>long</JobID>
          <Rows>long</Rows>
          <WebServicesID>long</WebServicesID>
          <TimeSubmit>dateTime</TimeSubmit>
          <TimeStart>dateTime</TimeStart>
          <TimeEnd>dateTime</TimeEnd>
          <Status>int</Status>
          <Queue>int</Queue>
          <TaskName>string</TaskName>
          <OutputLoc>string</OutputLoc>
          <Error>string</Error>
          <Query>string</Query>
          <Context>string</Context>
          <Type>string</Type>
        </CJJob>
        <CJJob>
          <JobID>long</JobID>
          <Rows>long</Rows>
          <WebServicesID>long</WebServicesID>
          <TimeSubmit>dateTime</TimeSubmit>
          <TimeStart>dateTime</TimeStart>
          <TimeEnd>dateTime</TimeEnd>
          <Status>int</Status>
          <Queue>int</Queue>
          <TaskName>string</TaskName>
          <OutputLoc>string</OutputLoc>
          <Error>string</Error>
          <Query>string</Query>
          <Context>string</Context>
          <Type>string</Type>
        </CJJob>
      </GetJobsResult>
    </GetJobsResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /gcasjobs/services/jobs.asmx/GetJobs?owner_wsid=string&owner_pw=string&conditions=string&includeSystem=string HTTP/1.1
Host: mastweb.stsci.edu
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCJJob xmlns="http://Services.Cas.jhu.edu">
  <CJJob>
    <JobID>long</JobID>
    <Rows>long</Rows>
    <WebServicesID>long</WebServicesID>
    <TimeSubmit>dateTime</TimeSubmit>
    <TimeStart>dateTime</TimeStart>
    <TimeEnd>dateTime</TimeEnd>
    <Status>int</Status>
    <Queue>int</Queue>
    <TaskName>string</TaskName>
    <OutputLoc>string</OutputLoc>
    <Error>string</Error>
    <Query>string</Query>
    <Context>string</Context>
    <Type>string</Type>
  </CJJob>
  <CJJob>
    <JobID>long</JobID>
    <Rows>long</Rows>
    <WebServicesID>long</WebServicesID>
    <TimeSubmit>dateTime</TimeSubmit>
    <TimeStart>dateTime</TimeStart>
    <TimeEnd>dateTime</TimeEnd>
    <Status>int</Status>
    <Queue>int</Queue>
    <TaskName>string</TaskName>
    <OutputLoc>string</OutputLoc>
    <Error>string</Error>
    <Query>string</Query>
    <Context>string</Context>
    <Type>string</Type>
  </CJJob>
</ArrayOfCJJob>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /gcasjobs/services/jobs.asmx/GetJobs HTTP/1.1
Host: mastweb.stsci.edu
Content-Type: application/x-www-form-urlencoded
Content-Length: length

owner_wsid=string&owner_pw=string&conditions=string&includeSystem=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCJJob xmlns="http://Services.Cas.jhu.edu">
  <CJJob>
    <JobID>long</JobID>
    <Rows>long</Rows>
    <WebServicesID>long</WebServicesID>
    <TimeSubmit>dateTime</TimeSubmit>
    <TimeStart>dateTime</TimeStart>
    <TimeEnd>dateTime</TimeEnd>
    <Status>int</Status>
    <Queue>int</Queue>
    <TaskName>string</TaskName>
    <OutputLoc>string</OutputLoc>
    <Error>string</Error>
    <Query>string</Query>
    <Context>string</Context>
    <Type>string</Type>
  </CJJob>
  <CJJob>
    <JobID>long</JobID>
    <Rows>long</Rows>
    <WebServicesID>long</WebServicesID>
    <TimeSubmit>dateTime</TimeSubmit>
    <TimeStart>dateTime</TimeStart>
    <TimeEnd>dateTime</TimeEnd>
    <Status>int</Status>
    <Queue>int</Queue>
    <TaskName>string</TaskName>
    <OutputLoc>string</OutputLoc>
    <Error>string</Error>
    <Query>string</Query>
    <Context>string</Context>
    <Type>string</Type>
  </CJJob>
</ArrayOfCJJob>