This article contains a list of REST API commands that pertain to IBM MQ subscriptions.
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 Subscription Data
GET /ibmmq/subscriptions/{nodeName}/{qmgrName}/{subscriptionName}
Purpose: Lists the attributes of the specified subscription on the specified node and queue manager.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/ibmmq/subscriptions/LEUNAME/LEUNAME/SYSTEM.DEFAULT.SUB?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"name": "SYSTEM.DEFAULT.SUB",
"uri": "/rest/v1/ibmmq/subscriptions/LEUNAME/LEUNAME/SYSTEM.DEFAULT.SUB",
"general": {
"topicName": "",
"topicString": "",
"wildcardSchema": "Topic Schema",
"scope": "All Qmgrs",
"durable": "Yes",
"type": "Administrative",
"selectorType": "None",
"pubSubProperties": "As PCF Attributes",
"selector": "",
"userData": ""
},
"extended": {
"variableUserId": "Any User",
"userId": "",
"applIdentityData": "",
"accountingToken": "0000000000000000000000000000000000000000000000000000000000000000",
"pubPriority": "As Published",
"subId": "414D51204C45554E414D45202020202079D0005410000006",
"expiry": -1,
"requestOnly": "Publish All",
"level": "1"
},
"destination": {
"destinationQMgr": "",
"destination": "",
"destinationClass": "Provided",
"destinationCorrelId": "000000000000000000000000000000000000000000000000"
},
"state": {
"lastUpdated": 1643918013000,
"alterDate": "2014-08-29",
"alterTime": "15:12:02",
"createDate": "2014-08-29",
"createTime": "15:12:02",
"connId": "",
"pubCount": 0,
"lastMsgDate": "",
"lastMsgTime": "",
"resumeDate": "",
"resumeTime": ""
},
"jobs": {
"totalJobCount": 0,
"scheduledJobCount": 0,
"canceledJobCount": 0,
"successJobCount": 0,
"failedJobCount": 0,
"readyJobCount": 0,
"pendingJobCount": 0,
"jobIds": []
},
"customProperties": {}
}
Search Subscriptions
GET /ibmmq/subscriptions
Purpose: Lists subscriptions based on the specified criteria.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/ibmmq/subscriptions?nodeName=LEUNAME" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
[
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "EMIK",
"name": "EMIK SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS 414D51590101000000000000000000000000000000000000 SYSTEM.BROKER.ADMIN.STREAM MQ/EMIK /StreamSupport"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"name": "LEUNAME SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS 414D51590101000000000000000000000000000000000000 SYSTEM.BROKER.ADMIN.STREAM MQ/LEUNAME /StreamSupport"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "Nastel1234",
"name": "Nastel1234 SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS 414D51590101000000000000000000000000000000000000 SYSTEM.BROKER.ADMIN.STREAM MQ/Nastel1234 /StreamSupport"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "QA",
"name": "QA SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS 414D51590101000000000000000000000000000000000000 SYSTEM.BROKER.ADMIN.STREAM MQ/QA /StreamSupport"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"name": "SYSTEM.ADD.NEW.SUBSCRIPTION121.ICON"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "QA",
"name": "SYSTEM.ADD.NEW.SUBSCRIPTION121.ICON"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"name": "SYSTEM.ADD.NEW.SUBSCRIPTION121.OPTIONS"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "EMIK",
"name": "SYSTEM.DEFAULT.SUB"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "LEUNAME",
"name": "SYSTEM.DEFAULT.SUB"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "Nastel1234",
"name": "SYSTEM.DEFAULT.SUB"
},
{
"wgsName": "MQM",
"nodeName": "LEUNAME",
"qmgrName": "QA",
"name": "SYSTEM.DEFAULT.SUB"
},
]