This article contains a list of REST API commands that pertain to events.
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.
Search Events
GET /events
Purpose: Lists events based on the selected object and, if specified, event type.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/events?objectType=Workgroup%20Server&nodeName=LEUNAME&eventType=Schedule" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response (without attributes)
[ { "wgsName": "MQM", "type": "Schedule", "eventNo": 3 }, { "wgsName": "MQM", "type": "Schedule", "eventNo": 2 }, { "wgsName": "MQM", "type": "Schedule", "eventNo": 1 } ]
Example Request and Response (with attributes)
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/events?objectType=Workgroup%20Server&nodeName=LEUNAME&eventType=Schedule&attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
[
{
"wgsName": "MQM",
"type": "Schedule",
"eventNo": 3,
"uri": "/rest/v1/events/Schedule/3",
"general": {
"eventTimeStamp": 1640106095000,
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME"
},
"diagnostic": {
"eventTime": 876018,
"origUserId": "ADMIN",
"objectType": "Queue",
"objectName": "AB.MQ.Q.04"
},
"extended": {
"pcfCommand": 10
},
"scheduler": {
"jobId": "b92b0b73-627e-11ec-8bba-066cbf238f1a",
"status": "Cancelled",
"jobTimeStamp": 1669913640000,
"reason": 0,
"jobTags": "test"
}
},
{
"wgsName": "MQM",
"type": "Schedule",
"eventNo": 2,
"uri": "/rest/v1/events/Schedule/2",
"general": {
"eventTimeStamp": 1640105843000,
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME"
},
"diagnostic": {
"eventTime": 876270,
"origUserId": "ADMIN",
"objectType": "Queue",
"objectName": "AB.MQ.Q.04"
},
"extended": {
"pcfCommand": 10
},
"scheduler": {
"jobId": "b92b0b73-627e-11ec-8bba-066cbf238f1a",
"status": "Approved",
"jobTimeStamp": 1669913640000,
"reason": 0,
"jobTags": "test"
}
},
{
"wgsName": "MQM",
"type": "Schedule",
"eventNo": 1,
"uri": "/rest/v1/events/Schedule/1",
"general": {
"eventTimeStamp": 1640105695000,
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME"
},
"diagnostic": {
"eventTime": 876418,
"origUserId": "ADMIN",
"objectType": "Queue",
"objectName": "AB.MQ.Q.04"
},
"extended": {
"pcfCommand": 10
},
"scheduler": {
"jobId": "b92b0b73-627e-11ec-8bba-066cbf238f1a",
"status": "Submitted",
"jobTimeStamp": 1669913640000,
"reason": 0,
"jobTags": "test"
}
}
]
Read Event Data
GET /events/{eventType}/{eventNo}
Purpose: Lists event details based on the event type and number specified.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/events/Schedule/1?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
{
"wgsName": "MQM", "type": "Schedule", "eventNo": 1, "uri": "/rest/v1/events/Schedule/1", "general": { "eventTimeStamp": 1640105695000, "nodeName": "LEUNAME", "qmgrName": "LEUNAME" }, "diagnostic": { "eventTime": 877836, "origUserId": "ADMIN", "objectType": "Queue", "objectName": "AB.MQ.Q.04" }, "extended": { "pcfCommand": 10 }, "scheduler": { "jobId": "b92b0b73-627e-11ec-8bba-066cbf238f1a", "status": "Submitted", "jobTimeStamp": 1669913640000, "reason": 0, "jobTags": "test" } }