This article contains a list of REST API commands that pertain to EMS queues.
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.
Jump ahead: |
Search EMS Queues
GET /ems/queues
Purpose: List EMS queues that meet the criteria specified in the parameters, including their properties.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/ems/queues?nodeName=EMSNodeTest7&managerName=EMS-SERVER&queueName=EMSQ03807&attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
[
{
"wgsName": "MQM",
"nodeName": "EMSNodeTest7",
"managerName": "EMS-SERVER",
"queueName": "EMSQ03807",
"uri": "/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03807",
"general": {
"qDefType": "Predefined",
"flowCtrlMaxBytes": 0,
"expiryOverride": 0,
"maxRedelivery": 0,
"maxMsgs": 999999,
"maxBytes": 0,
"overFlowPolicy": "Default",
"redeliveryDelay": 0,
"store": "$sys.nonfailsafe",
"prefetch": 5,
"msgTrace": "None",
"isExclusive": false,
"isGlobal": false,
"isSenderName": false,
"isSecure": false,
"isSenderNameEnforced": false
},
"state": {
"lastUpdated": 1640716715000,
"consumerCount": 0,
"receiverCount": 0,
"deliveredMsgCount": 0,
"inTransitMsgCount": 0,
"pendingMsgCount": 0,
"pendingMsgSize": 0,
"pendingPersistentMsgCount": 0,
"pendingPersistentMsgSize": 0,
"routeName": "",
"isRouted": false,
"isFailsafe": false,
"isRouteConnected": false,
"isGlobalInherited": false,
"isBridgeTargetsInherited": false,
"isExpiryOverrideInherited": false,
"isFailsafeInherited": false,
"isFlowCtrlMaxBytesInherited": false,
"isImportTransportsInherited": false,
"isMaxBytesInherited": false,
"isMaxMsgsInherited": false,
"isMsgTraceInherited": false,
"isOverflowPolicyInherited": false,
"isPrefetchInherited": true,
"isRedeliveryDelayInherited": false,
"isSecureInherited": false,
"isSenderNameEnforcedInherited": false,
"isSenderNameInherited": false,
"isStatic": true,
"isStoreInherited": true,
"isExclusiveInherited": false,
"isMaxRedeliveryInherited": false,
"isTemporary": false,
"importTransports": [],
"jndiNames": [],
"bridgeTargets": []
},
"inboundStat": {
"byteRate": 0,
"messageRate": 0,
"totalBytes": 0,
"totalMessages": 0
},
"outboundStat": {
"byteRate": 0,
"messageRate": 0,
"totalBytes": 0,
"totalMessages": 0
},
"jobs": {
"totalJobCount": 0,
"scheduledJobCount": 0,
"canceledJobCount": 0,
"successJobCount": 0,
"failedJobCount": 0,
"readyJobCount": 0,
"pendingJobCount": 0,
"jobIds": []
},
"customProperties": {}
}
]
Read EMS Queue Data
GET /ems/queues/{nodeName}/{managerName}/{queueName}
Purpose: List EMS queues on the specified node and queue manager and their properties.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/ems/queues/EMSNodeBOA7/EMS-SERVER/EMSQ03807?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
{
"wgsName": "MQM",
"nodeName": "EMSNodeTest7",
"managerName": "EMS-SERVER",
"queueName": "EMSQ03807",
"uri": "/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03807",
"general": {
"qDefType": "Predefined",
"flowCtrlMaxBytes": 0,
"expiryOverride": 0,
"maxRedelivery": 0,
"maxMsgs": 999999,
"maxBytes": 0,
"overFlowPolicy": "Default",
"redeliveryDelay": 0,
"store": "$sys.nonfailsafe",
"prefetch": 5,
"msgTrace": "None",
"isExclusive": false,
"isGlobal": false,
"isSenderName": false,
"isSecure": false,
"isSenderNameEnforced": false
},
"state": {
"lastUpdated": 1640718485000,
"consumerCount": 0,
"receiverCount": 0,
"deliveredMsgCount": 0,
"inTransitMsgCount": 0,
"pendingMsgCount": 0,
"pendingMsgSize": 0,
"pendingPersistentMsgCount": 0,
"pendingPersistentMsgSize": 0,
"routeName": "",
"isRouted": false,
"isFailsafe": false,
"isRouteConnected": false,
"isGlobalInherited": false,
"isBridgeTargetsInherited": false,
"isExpiryOverrideInherited": false,
"isFailsafeInherited": false,
"isFlowCtrlMaxBytesInherited": false,
"isImportTransportsInherited": false,
"isMaxBytesInherited": false,
"isMaxMsgsInherited": false,
"isMsgTraceInherited": false,
"isOverflowPolicyInherited": false,
"isPrefetchInherited": true,
"isRedeliveryDelayInherited": false,
"isSecureInherited": false,
"isSenderNameEnforcedInherited": false,
"isSenderNameInherited": false,
"isStatic": true,
"isStoreInherited": true,
"isExclusiveInherited": false,
"isMaxRedeliveryInherited": false,
"isTemporary": false,
"importTransports": [],
"jndiNames": [],
"bridgeTargets": []
},
"inboundStat": {
"byteRate": 0,
"messageRate": 0,
"totalBytes": 0,
"totalMessages": 0
},
"outboundStat": {
"byteRate": 0,
"messageRate": 0,
"totalBytes": 0,
"totalMessages": 0
},
"jobs": {
"totalJobCount": 0,
"scheduledJobCount": 0,
"canceledJobCount": 0,
"successJobCount": 0,
"failedJobCount": 0,
"readyJobCount": 0,
"pendingJobCount": 0,
"jobIds": []
},
"customProperties": {}
}
Create EMS Queue
POST /ems/queues
Purpose: Creates an EMS queue of the specified name on the specified queue manager and node.
Curl example
curl -X POST "http://jenkins.nastel.com:8019/rest/v1/ems/queues" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d "{\"wgsName\":\"MQM\",\"nodeName\":\"EMSNodeTest7\",\"managerName\":\"EMS-SERVER\",\"queueName\":\"EMSQ03999\",\"uri\":\"/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03999\"}"
JSON example
{
"wgsName": "MQM",
"nodeName": "EMSNodeTest7",
"managerName": "EMS-SERVER",
"queueName": "EMSQ03999",
"uri": "/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03999"
}
Example Response
Code: 201 (Object Created)
Response headers:
content-length: 0
date: Tue, 28 Dec 2021 19:46:44 GMT
server: Jetty(9.4.28.v20200408)
Delete EMS Queue
DELETE /ems/queues/{nodeName}/{managerName}/{queueName}
Purpose: Deletes the specified queue.
Curl example
curl -X DELETE "http://jenkins.nastel.com:8019/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03999" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
Code: 204 (Object Deleted)
Response headers
date: Tue, 28 Dec 2021 20:05:57 GMT
server: Jetty(9.4.28.v20200408)
Copy EMS Queue
POST /ems/queues/{nodeName}/{managerName}/{queueName}/copy
Purpose: Creates a copy of the specified queue with a new name and location.
Curl example
curl -X POST "http://jenkins.nastel.com:8019/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03811/copy" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d "{\"wgsName\":\"MQM\",\"nodeName\":\"EMSNodeTest7\",\"managerName\":\"EMS-SERVER\",\"queueName\":\"EMSQ03811SMD\",\"uri\":\"/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03811SMD\"}"
JSON example
{
"wgsName": "MQM",
"nodeName": "EMSNodeTest7",
"managerName": "EMS-SERVER",
"queueName": "EMSQ03811",
"uri": "/rest/v1/ems/queues/EMSNodeTest7/EMS-SERVER/EMSQ03811"
}
Example Response
Code: 201 (Object Created)
Response headers
content-length: 0
date: Tue, 28 Dec 2021 20:27:18 GMT
server: Jetty(9.4.28.v20200408)
Force Update
PATCH /ems/queues/{nodeName}/{managerName}/{queueName}/force-update
Purpose: Retrieves the most recent copy of the queue data.
Curl example
curl -X PATCH "http://jenkins.nastel.com:8019/rest/v1/ems/queues/EMSNodeBOA7/EMS-SERVER/EMSQ03811/force-update" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
Code: 204 (Object Changed)
Response headers
date: Tue, 28 Dec 2021 20:52:51 GMT
server: Jetty(9.4.28.v20200408)