This article contains a list of REST API commands that pertain to schedules.
For a walk-through of the Navigator REST API using the demo site, see Using the REST API using the Navigator demo system. No installation is required. The article Performing REST API operations using the Swagger UI includes three detailed examples, as well as instructions for issuing plain text or JSON-formatted MQSC Commands through the REST API.
Read Schedule Job Data
GET /schedule-jobs/{nodeName}/{qmgrName}/{jobId}
Purpose: Finds the schedule job and returns its attributes. You must either enter attributes or an asterisk in the attributes parameter to retrieve details about the job.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/schedule-jobs/LEUNAME/LEUNAME/b92b0b73-627e-11ec-8bba-066cbf238f1a?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
{
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"jobId": "b92b0b73-627e-11ec-8bba-066cbf238f1a",
"uri": "/rest/v1/schedule-jobs/LEUNAME/LEUNAME/b92b0b73-627e-11ec-8bba-066cbf238f1a",
"general": {
"date": 1669913640000,
"commandId": 10,
"objectType": "Queue",
"objectName": "AB.MQ.Q.04",
"reasonCode": 0,
"userName": "ADMIN",
"approvedDate": 1640105843000,
"approvedBy": "ADMIN"
},
"extended": {
"fullStatus": "Cancelled",
"countRetry": 1,
"running": false,
"lastUpdate": 1640106095000,
"expirationDate": 1669917240000,
"retryLogic": false
},
"messageAttributes": [
{
"attrId": 4
},
{
"attrId": 4
},
{
"attrId": 4
},
{
"attrId": 4
},
{
"attrId": 4
},
{
"attrId": 3
}
]
}
Search Schedule Jobs
GET /schedule-jobs
Purpose: Finds schedule jobs that meet the criteria specified and lists their job IDs.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/schedule-jobs?nodeName=LEUNAME&qmgrName=LEUNAME" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
[
{
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"jobId": "b92b0b73-627e-11ec-8bba-066cbf238f1a"
}
]