This API retrieves the saved configuration settings of a specified job schedule.
It also retrieves the schedule logs if the displayLogs
parameter is true.
GET /scheduler/jobs/{jobId}/schedules/{scheduleId}
Path
Parameter |
Required |
Data Type |
Description |
---|---|---|---|
|
Yes |
integer |
ID of the job to which scheduleId belongs |
|
Yes |
string |
ID of the schedule whose details are to be retrieved |
Body
Parameter |
Required |
Data Type |
Description |
---|---|---|---|
|
No |
boolean |
Controls whether the API should return the logs for the schedule. No more than 200 logs can be returned per request. Allowed value is true or false. |
GET /scheduler/jobs/3/schedules/cb5c9def-e2a0-4294-8a51-61e4db373f99?displayLogs=true
The call was successful and returns the details of the schedule (and its logs, based on the displayLogs=true
request parameter).
{
"scheduleId": "<schedule ID details>",
"description": "this schedule runs every 1 hour",
"data": "{\"salesOrderId\":\"1234\"}",
"type": "recurring",
"cron": "* * * * */1 0 0",
"active": false,
"startTime": "2015-10-20 04:30:00",
"endTime": null,
"nextRunAt": "2017-08-11 10:00:00",
"logs": [
{
"runId": "7841efdb-7ee0-48a6-a8a5-cbcafa1035b9",
"httpStatus": null,
"executionTimestamp": null,
"runStatus": "SCHEDULED",
"runState": "SCHEDULED",
"statusMessage": "The job has been scheduled for a future run",
"scheduleTimestamp": "2017-08-10 11:00:00",
"completionTimestamp": null,
"runText": "[{\"time\":\"2017-08-10 11:00:00\",\"type\":\"SCHEDULED\",\"text\":\"\",\"code\":null}]",
"locale": "en"
},
{
"runId": "a68b86cf-1944-4e78-9cde-889e6bb713b3",
"httpStatus": 404,
"executionTimestamp": "2017-08-10 11:00:00", //indicates when actually the scheduler invoked action endpoint
"runStatus": "COMPLETED",
"runState": "REQUEST_ERROR",
"statusMessage": "Error encountered while sending job execution request to the endpoint",
"scheduleTimestamp": "2017-08-10 10:00:00", //indicates when the schedule was picked up for calculation of next-run
"completionTimestamp": "2017-08-10 11:00:00", //indicates when the scheduler received response from the action endpoint
"runText": "[{\"time\":\"2017-08-10 10:00:00\",\"type\":\"SCHEDULED\",\"text\":\"\",\"code\":null},{\"time\":\"2017-08-10 11:00:00\",\"type\":\"TRIGGERED\",\"text\":\"\",\"code\":null},{\"time\":\"2017-08-10 11:00:00\",\"type\":\"REQUEST_ERROR\",\"text\":\"Response: Cannot PUT /health_status\\n\",\"code\":404}]",
"locale": "en"
}
]
}
Passing invalid Job ID.
Related Information