Get Job Status
GET /ws/rest/service/v2/activity/sheets/jobStatus/{jobId}
Available from: 23.10 and later
Purpose
Get the job status triggered with Activities REST service. It returns the status of jobs triggered as background jobs.
Query Format
Send a GET request in the above format.
Query Parameter
Specify the following parameters in the request query:
| Request Parameter | Required? | Data Type | Description |
| jobId | Yes | Integer | The job ID of the background job. For example, 8294. |
Response Format
A JSON object is returned in the following format:
{
"data": [],
"message": [<list of messages>],
"status": <REST status code value>,
"rest_audit_id": <id from the audit table>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Success Request
To retrieve the status of job with Job ID, 1688113665288, send a request in the following format:
{hosturl}/ws/rest/service/v2/activity/sheets/jobStatus/1688113665288
Sample Success Response
A successful response with status code 200 displays in the following format:
{
"data" : [],
"message": [
{
"jobId": 1688113665288,
"jobStatus": "COMPLETED",
"jobDetail": "Job is completed successfully."
}
],
"status": 200,
"rest_audit_id": 16306
}
Sample Success Response for Schedule REST Service
A successful response displays in the following format:
{
"data": [],
"message": [
{
"jobId": 1716353066262,
"jobStatus": "COMPLETED",
"jobDetail": [
{
"jobStatus": "COMPLETED",
"jobDetail": "Source Project ID: P-0115",
"jobType": "Recost"
},
{
"jobStatus": "COMPLETED",
"jobDetail": "Cost rolled up successfully.",
"jobType": "Cost Sheet Rollup"
},
{
"jobStatus": "COMPLETED",
"jobDetail": "Activity Schedule completed successfully.",
"jobType": "Schedule"
}
]
}
],
"rest_audit_id": 29338,
"status": 200
}
Sample Failed Request
An incorrect job ID is sent in the following request:
{hosturl}/ws/rest/service/v2/activity/sheets/jobStatus/1716353066262abc
Sample Failed Response
A failed response displays the corresponding status code in the following format:
{
"data": [],
"message": ["The API request contains invalid value for: [jobId]. Allowed only integer values." ],
"rest_audit_id": 29339,
"status": 12511
}
Supported Validation Messages and Status Codes
The following validation messages and status codes display in the response when incorrect values are provided in the request:
| Field Name | Use-case Scenario | Status Code | Error Message |
| jobId | jobId value is empty. | 12512 | The API request contains empty value for: [jobId]. Allowed only integer values. |
| jobId | Invalid data type or invalid value. | 12511 | The API request contains invalid value for: [jobId]. Allowed only integer values. |
| jobId | jobId is negative or has not been configured. | 12520 | Job details are not present in Unifier. [jobId] : {jobId} |