This article contains a list of REST API commands that pertain to nodes.
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: |
Read Node Data
GET /nodes/{nodeName}
Purpose: Returns properties of the specified node.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/nodes/LEUNAME?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
{
"wgsName": "MQM",
"name": "LEUNAME",
"type": "Local Agent",
"uri": "/rest/v1/nodes/LEUNAME",
"identity": {
"useDns": "No",
"hostName": "",
"netAddress": "75.99.48.52",
"portNumber": 5016,
"version": "6.7.0004",
"platform": "WINDOWS NT",
"description": ""
},
"discovery": {
"heartBeat": 1,
"discoveryInterval": 720,
"refreshInterval": 30,
"commandTimeout": 90,
"pendingCommandLimit": 5000,
"useNewRefresh": "On",
"nameListDiscover": "Off",
"ping": 0,
"dnsName": ""
},
"extended": {
"traceAgent": "Disabled",
"uidToUpper": "On",
"maxWaitTime": 1000,
"tcpQueueLimit": 10,
"tcpRetryCount": 1,
"bufferSize": 64,
"tcpNoDelay": "Off",
"reuseAddr": "On"
},
"mask": {
"qmgr": "*",
"aliasQueue": "*",
"localQueue": "*",
"modelQueue": "*",
"remoteQueue": "*",
"channel": "*",
"client": "*",
"listener": "*",
"process": "*",
"service": "*",
"nameList": "*",
"authInfo": "*",
"clusterQMgr": "*",
"topic": "*",
"subscription": "*"
},
"qmgr": {
"logPath": "",
"primaryLogs": 0,
"secondaryLogs": 0,
"logFileSize": 0,
"logBufferSize": 0
},
"state": {
"lastUpdated": 1640810622000,
"objectState": "Active",
"managed": "Enabled",
"authorization": "Off",
"eventCounter": 0,
"lastAction": 10129,
"lastEventTime": 0,
"osInformation": "",
"cpuCount": 4,
"mipsCount": 0
},
"jobs": {
"totalJobCount": 0,
"scheduledJobCount": 0,
"canceledJobCount": 0,
"successJobCount": 0,
"failedJobCount": 0,
"readyJobCount": 0,
"pendingJobCount": 0,
"jobIds": []
},
"customProperties": {}
}
Discover Node ("Discover Now")
PATCH /nodes/{nodeName}/discover-now
Purpose: Initiates a full or incremental discovery of the specified node.
Curl example
curl -X PATCH "http://jenkins.nastel.com:8019/rest/v1/nodes/KafkaCM/discover-now" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d "{\"full\":true}"
JSON: Full Discovery
{
"full": true
}
JSON: Incremental Discovery
{
"full": false
}
Example Response
Code: 204 (Node Discovered)
Response headers:
date: Wed, 29 Dec 2021 22:20:55 GMT
server: Jetty(9.4.28.v20200408)
Start All WMQ Objects
PATCH /nodes/{nodeName}/start
Purpose: Starts the node and all objects on it.
Curl example
curl -X PATCH "http://jenkins.nastel.com:8019/rest/v1/nodes/LEUNAME/start" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
Code: 204 (Node Started)
Response headers:
date: Wed, 29 Dec 2021 23:15:41 GMT
server: Jetty(9.4.28.v20200408)
Manage/Unmanage Node
PATCH /nodes/{nodeName}/manage
Purpose: Manages or unmanages the specified node.
Enable Managing (Manage) Examples
Curl example
curl -X PATCH "http://jenkins.nastel.com:8019/rest/v1/nodes/LEUNAME/manage" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d "{\"manage\":\"Enabled\",\"discoveryPeriod\":0}"
JSON example
{
"manage": "Enabled",
"discoveryPeriod": 0
}
Disable Managing (Unmanage) Examples
Curl example
curl -X PATCH "http://jenkins.nastel.com:8019/rest/v1/nodes/LEUNAME/manage" -H "accept: */*" -H "Authorization: Basic QWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d "{\"manage\":\"Disabled\",\"discoveryPeriod\":0}"
JSON example
{
"manage": "Disabled",
"discoveryPeriod": 0
}
Example Response
Code: 204 (Node Mode Changed)
Response headers:
date: Wed, 29 Dec 2021 21:11:23 GMT
server: Jetty(9.4.28.v20200408)
Search Node Events
GET /nodes/{nodeName}/events
Purpose: Lists events of the specified node.
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/nodes/LEUNAME/events?attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
[
{
"wgsName": "MQM",
"type": "Alter",
"eventNo": 218,
"uri": "/rest/v1/events/Alter/218",
"general": {
"eventTimeStamp": 1640796822000,
"nodeName": "LEUNAME",
"qmgrName": "SMDTESTQM"
},
"diagnostic": {
"eventIdentifier": 20029,
"userId": "SYSTEM",
"eventTime": 21288,
"origUserId": "SYSTEM",
"objectType": "Queue",
"objectName": "SYSTEM.ADMIN.QMGR.EVENT"
},
"extended": {
"clientConnectionName": "",
"eventDescription": ""
},
"alter": {
"entityType": "Group",
"entityName": "mqm@LEUNAME"
},
"modifiedValues": [],
"extraAttributes": []
},
{
"wgsName": "MQM",
"type": "Alter",
"eventNo": 217,
"uri": "/rest/v1/events/Alter/217",
"general": {
"eventTimeStamp": 1640796822000,
"nodeName": "LEUNAME",
"qmgrName": "SMDTESTQM"
},
"diagnostic": {
"eventIdentifier": 20029,
"userId": "SYSTEM",
"eventTime": 21288,
"origUserId": "SYSTEM",
"objectType": "Queue",
"objectName": "SYSTEM.ADMIN.QMGR.EVENT"
},
"extended": {
"clientConnectionName": "",
"eventDescription": ""
},
"alter": {
"entityType": "Principal",
"entityName": "SYSTEM@NT AUTHORITY"
},
"modifiedValues": [],
"extraAttributes": []
},
{
"wgsName": "MQM",
"type": "Alter",
"eventNo": 216,
"uri": "/rest/v1/events/Alter/216",
"general": {
"eventTimeStamp": 1640796822000,
"nodeName": "LEUNAME",
"qmgrName": "SMDTESTQM"
},
"diagnostic": {
"eventIdentifier": 20029,
"userId": "SYSTEM",
"eventTime": 21288,
"origUserId": "SYSTEM",
"objectType": "Topic",
"objectName": "SYSTEM.BROKER.ADMIN.STREAM"
},
"extended": {
"clientConnectionName": "",
"eventDescription": ""
},
"alter": {
"entityType": "Group",
"entityName": "mqm@LEUNAME"
},
"modifiedValues": [],
"extraAttributes": []
},
{
"wgsName": "MQM",
"type": "Alter",
"eventNo": 215,
"uri": "/rest/v1/events/Alter/215",
"general": {
"eventTimeStamp": 1640796822000,
"nodeName": "LEUNAME",
"qmgrName": "SMDTESTQM"
},
"diagnostic": {
"eventIdentifier": 20029,
"userId": "SYSTEM",
"eventTime": 21288,
"origUserId": "SYSTEM",
"objectType": "Topic",
"objectName": "SYSTEM.BROKER.ADMIN.STREAM"
},
"extended": {
"clientConnectionName": "",
"eventDescription": ""
},
"alter": {
"entityType": "Principal",
"entityName": "SYSTEM@NT AUTHORITY"
},
"modifiedValues": [],
"extraAttributes": []
},
{
"wgsName": "MQM",
"type": "Alter",
"eventNo": 214,
"uri": "/rest/v1/events/Alter/214",
"general": {
"eventTimeStamp": 1640796822000,
"nodeName": "LEUNAME",
"qmgrName": "SMDTESTQM"
},
"diagnostic": {
"eventIdentifier": 20029,
"userId": "SYSTEM",
"eventTime": 21288,
"origUserId": "SYSTEM",
"objectType": "Queue",
"objectName": "SYSTEM.CLUSTER.COMMAND.QUEUE"
},
"extended": {
"clientConnectionName": "",
"eventDescription": ""
},
"alter": {
"entityType": "Group",
"entityName": "mqm@LEUNAME"
},
"modifiedValues": [],
"extraAttributes": []
}
]
Search Nodes
GET /nodes
Purpose: Lists nodes that match the specified parameters and their properties.
Enable Managing (Manage) Examples
Curl example
curl -X GET "http://jenkins.nastel.com:8019/rest/v1/nodes?nodeName=LEUNAME&attributes=%2A" -H "accept: application/json" -H "Authorization: Basic QWRtaW46YWRtaW4="
Example Response
[
{
"wgsName": "MQM",
"name": "LEUNAME",
"type": "Local Agent",
"uri": "/rest/v1/nodes/LEUNAME",
"identity": {
"useDns": "No",
"hostName": "",
"netAddress": "75.99.48.52",
"portNumber": 5016,
"version": "6.7.0004",
"platform": "WINDOWS NT",
"description": ""
},
"discovery": {
"heartBeat": 1,
"discoveryInterval": 720,
"refreshInterval": 30,
"commandTimeout": 90,
"pendingCommandLimit": 5000,
"useNewRefresh": "On",
"nameListDiscover": "Off",
"ping": 0,
"dnsName": ""
},
"extended": {
"traceAgent": "Disabled",
"uidToUpper": "On",
"maxWaitTime": 1000,
"tcpQueueLimit": 10,
"tcpRetryCount": 1,
"bufferSize": 64,
"tcpNoDelay": "Off",
"reuseAddr": "On"
},
"mask": {
"qmgr": "*",
"aliasQueue": "*",
"localQueue": "*",
"modelQueue": "*",
"remoteQueue": "*",
"channel": "*",
"client": "*",
"listener": "*",
"process": "*",
"service": "*",
"nameList": "*",
"authInfo": "*",
"clusterQMgr": "*",
"topic": "*",
"subscription": "*"
},
"qmgr": {
"logPath": "",
"primaryLogs": 0,
"secondaryLogs": 0,
"logFileSize": 0,
"logBufferSize": 0
},
"state": {
"lastUpdated": 1640815422000,
"objectState": "Active",
"managed": "Enabled",
"authorization": "Off",
"eventCounter": 0,
"lastAction": 10129,
"lastEventTime": 0,
"osInformation": "",
"cpuCount": 4,
"mipsCount": 0
},
"jobs": {
"totalJobCount": 0,
"scheduledJobCount": 0,
"canceledJobCount": 0,
"successJobCount": 0,
"failedJobCount": 0,
"readyJobCount": 0,
"pendingJobCount": 0,
"jobIds": []
},
"customProperties": {}
}
]