Jobs
Click here for a complete list of operations.
GetJobStatus
Returns an int that represents the current status of a job.
Possible values and their meanings are shown below.
0 = ready
1 = started
2 = canceling
3 = cancelled
4 = failed
5 = finished
'ready' is an idle state assigned to jobs created, but not yet processed.
'started' and 'canceling' are active states, describing jobs that are currently processing
'cancelled', 'failed' and 'finished' are final states, indicating a job's execution has terminated.
Parameters:
long wsid : WebServicesID of the account the status will be run under.
string pw : Password of said account
long jobId : Identifier of the job whose status will be retrieved.
Output:
int : A number representing the current status of the requested job. See above for what those numbers means.
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.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 /CasJobs/services/jobs.asmx HTTP/1.1 Host: casjobs.sdss.org Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://Services.Cas.jhu.edu/GetJobStatus" <?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> <GetJobStatus xmlns="http://Services.Cas.jhu.edu"> <wsId>long</wsId> <pw>string</pw> <jobId>long</jobId> </GetJobStatus> </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> <GetJobStatusResponse xmlns="http://Services.Cas.jhu.edu"> <GetJobStatusResult>int</GetJobStatusResult> </GetJobStatusResponse> </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 /CasJobs/services/jobs.asmx HTTP/1.1 Host: casjobs.sdss.org 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> <GetJobStatus xmlns="http://Services.Cas.jhu.edu"> <wsId>long</wsId> <pw>string</pw> <jobId>long</jobId> </GetJobStatus> </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> <GetJobStatusResponse xmlns="http://Services.Cas.jhu.edu"> <GetJobStatusResult>int</GetJobStatusResult> </GetJobStatusResponse> </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 /CasJobs/services/jobs.asmx/GetJobStatus?wsId=string&pw=string&jobId=string HTTP/1.1 Host: casjobs.sdss.org
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <int xmlns="http://Services.Cas.jhu.edu">int</int>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /CasJobs/services/jobs.asmx/GetJobStatus HTTP/1.1 Host: casjobs.sdss.org Content-Type: application/x-www-form-urlencoded Content-Length: length wsId=string&pw=string&jobId=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <int xmlns="http://Services.Cas.jhu.edu">int</int>