Obtain the status of a job
You can use this operation to obtain the status of a batch job on z/OS®.
HTTP method and URI path
GET /zosmf/restjobs/jobs/<jobname>/<jobid>?[step-data=Y|N]
GET /zosmf/restjobs/jobs/<correlator>?[step-data=Y|N]
- /zosmf/restjobs/jobs/ identifies the z/OS jobs REST interface.
- <jobname>/<jobid> identifies the job for which status is requested. Use either the job name and job ID combination or the job correlator to identify the job.
- <correlator> identifies the job for which status
is requested. Use either the job name and job ID combination or the
job correlator to identify the job.
To use a job correlator on this request, specify the full job correlator for the job: The 31-byte system portion, a semicolon, and the user portion (up to 32 bytes). The correlator can be one that you have obtained from the "job-correlator" property in a returned JSON job document. Alternatively, you can specify the complete URL as provided in the "url" property of a JSON job document.
- [step-data] is an optional parameter that indicates whether the service will return information about each step in the job that has completed, such as the step name, step number, and completion code. To return the step data for completed steps, set the value for this parameter to Y. Otherwise, omit the parameter or set its value to N (default). Note that if a step is run multiple times, duplicate data for that step might be included in the response.
Custom headers
None.
Query parameters
None.
Required authorizations
Usage considerations
See Usage considerations for the z/OSMF REST services.
https://host:port/zosmf/restjobs/jobs/-JESB/jobname/jobid
Expected response
On completion, the z/OS jobs REST interface returns an HTTP response with a JSON job document. For the contents, see Job document.
For errors, z/OS jobs REST interface returns an appropriate HTTP status code and error information as a JSON error report document. See Error report document.
Example request
GET /zosmf/restjobs/jobs/BLSJPRMI/STC00052 HTTP/1.1
Host: zosmf1.yourco.com