This article describes how to update an existing ActiveMQ network connector using the REST API.
Endpoint
PATCH/activemq/network-connectors/{nodeName}/{managerName}/{brokerName}/{networkConnectorName}
Path Parameters
| Parameter | Type | Required | Description |
nodeName |
string | Yes | Name of the ActiveMQ node. |
managerName |
string | Yes | Name of the ActiveMQ manager that contains the specified broker. |
brokerName |
string | Yes | Name of the ActiveMQ broker that contains the specified network connector. |
networkConnectorName |
string | Yes | Name of the ActiveMQ network connector to retrieve. |
Query Parameters
| Parameter | Type | Required | Description |
jobDate |
integer | No | Schedule job date (Unix Timestamp). |
jobTags |
string | No | A comma-separated list of schedule job tags (used only with jobDate). |
validateAccessForUser |
string | No | Validates endpoint access for the specified user. |
waitForRead |
boolean | No | Wait for cache update. |
Request Body
{
"wgsName": "MQM",
"nodeName": "REMOTE_ACTIVEMQ",
"managerName": "Activemq-16",
"brokerName": "DemoBroker",
"networkConnectorName": "local-network",
"uri": "/activemq/network-connectors/REMOTE_ACTIVEMQ/Activemq-16/DemoBroker/local-network",
"general": {
"prefetchSize": 2000,
"autoStart": true
}
}'Example Request
curl -X 'PATCH' \
'http://localhost:8019/rest/v1/activemq/network-connectors/REMOTE_ACTIVEMQ/Activemq-16/DemoBroker/local-network' \
-H 'accept: */*' \
-H 'Authorization: Basic QWRtaW46YWRtaW4=' \
-H 'Content-Type: application/json' \
-d '{
"wgsName": "MQM",
"nodeName": "REMOTE_ACTIVEMQ",
"managerName": "Activemq-16",
"brokerName": "DemoBroker",
"networkConnectorName": "local-network",
"uri": "/activemq/network-connectors/REMOTE_ACTIVEMQ/Activemq-16/DemoBroker/local-network",
"general": {
"prefetchSize": 2000,
"autoStart": true
}
}'\'''Request URL
http://localhost:8019/rest/v1/activemq/network-connectors/REMOTE_ACTIVEMQ/Activemq-16/DemoBroker/local-network
Response Codes
| Status Code | Description |
| 204 | Object changed |
| 304 | Object not changed |
Example Response
-
Success Response (204-Object changed): Indicates that the ActiveMQ network connector was successfully updated. No response body is returned.
Response headers:
access-control-allow-credentials: true access-control-allow-origin: http://localhost:8019 date: server: vary:
-
Example Error Response: 304-Object not changed
{ "type": "pcf", "messageId": "WGS0008", "message": "Object not changed", "explanation": "Problem on changing object, check PCF code value.", "action": "Resubmit request with a valid object.", "code": "2059", "codeStr": "MQRC_Q_MGR_NOT_AVAILABLE" }