This article contains a list of REST API commands that pertain to IBM MQ services.
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 MQ Object Authority Records
GET /ibmmq/servicess/{nodeName}/{qmgrName}/{serviceName}/auth-recs
Purpose: Lists authority records for the service.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/ibmmq/servicess/LEUNAME/QA/SYSTEM.DEFAULT.SERVICE/auth-recs" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
JSON example: Response
{
"authRecs": [
{
"objectType": "service",
"objectName": "SYSTEM.DEFAULT.SERVICE",
"principalName": "jsmith@TEST",
"auths": [
"chg",
"dlt",
"dsp",
"ctrl"
]
},
{
"objectType": "service",
"objectName": "SYSTEM.DEFAULT.SERVICE",
"groupName": "mqm@LEUNAME",
"auths": [
"chg",
"dlt",
"dsp",
"ctrl"
]
}
],
"overallCompletionCode": 0,
"overallReasonCode": 0
}
Read Service Data
GET /ibmmq/servicess/{nodeName}/{qmgrName}/{serviceName}
Purpose: Finds a service and its properties on the specified node and queue manager.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/ibmmq/servicess/LEUNAME/QA/SYSTEM.DEFAULT.SERVICE?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
JSON example: Response
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "QA",
"name": "SYSTEM.DEFAULT.SERVICE",
"uri": "/rest/v1/ibmmq/servicess/LEUNAME/QA/SYSTEM.DEFAULT.SERVICE",
"general": {
"description": "",
"type": "Command",
"control": "Manual"
},
"startup": {
"startCommand": "",
"startArguments": "",
"stdOutDest": "",
"stdErrDest": ""
},
"shutdown": {
"stopCommand": "",
"stopArguments": ""
},
"state": {
"lastUpdated": 1643905563000,
"alterDate": "2014-08-29",
"alterTime": "15.14.46",
"lastAction": 0,
"status": "Stopped",
"processId": 0,
"startDate": "",
"startTime": ""
},
"jobs": {
"totalJobCount": 0,
"scheduledJobCount": 0,
"canceledJobCount": 0,
"successJobCount": 0,
"failedJobCount": 0,
"readyJobCount": 0,
"pendingJobCount": 0,
"jobIds": []
},
"customProperties": {}
}