The /topologies/{topologyName}/nodes
endpoint allows you to create, retrieve, update and delete one or more topology nodes.
To retrieve a single node for a topology, see /topologies/{topologyName}/nodes/{nodeName}.
Back to Topologies API Endpoint Reference.
Retrieves details of all nodes for a specified topology.
The GET request takes the following path parameter:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | Name of the topology. You can obtain all topology names by executing a GET request to |
The GET request returns the following response:
Successful requests return an array of JSON objects containing the following:
Name | Type | Description |
---|---|---|
| String | Name of the node. |
| String | Description of the node. |
The following example demonstrates making a GET request to the /topologies/{topologyName}/nodes
endpoint.
Example cURL GET request to return node details for the "host" topology:
curl -X GET 'https://example.com/api/v1/topologies/host/nodes' -u phil:password123
Example response returning the topology's node details:
[
{
"name": "node1",
"description": "First node"
},
{
"name": "node2",
"description": "Second node"
}
]
Creates one or more nodes in a topology.
The POST request takes the following request payload:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | Name of the node. |
| String | No | Description of the node. |
The POST request returns the following response:
Successful requests return an array of JSON objects containing the following:
Name | Type | Description |
---|---|---|
| String | Name of the node. |
| String | Description of the node. |
If you send an existing name in the request, it will be ignored and returned in the response.
The following example demonstrates making a POST request to the /topologies/{topologyName}/nodes
endpoint.
Example cURL POST request to create two nodes in the "host" topology:
curl -X POST 'https://example.com/api/v1/topologies/host/nodes' \
--header 'Content-Type: application/json; charset=UTF-8' \
-u phil:password123 \
-d '[{"name":"node1","description":"First node"},{"name":"node2","description":"Second node"}]'
Example response returning the new topologies:
[
{
"name": "node1",
"description: "First node"
},
{
"name": "node2",
"description: "Second node"
}
]
Updates one or more nodes in a topology. You can only update node descriptions, not node names.
The PUT request takes the following request payload:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | Name of the topology. |
| String | No | Description of the topology. |
The PUT request returns the following response:
Successful requests return an array of JSON objects containing the following:
Name | Type | Description |
---|---|---|
| String | Name of the node. |
| String | Description of the node. |
The following example demonstrates making a PUT request to the /topologies/{topologyName}/nodes
endpoint.
Example cURL PUT request to update two nodes in the "host" topology named "node1" and "node2":
curl -X PUT 'https://example.com/api/v1/topologies/host/nodes' \
--header 'Content-Type: application/json; charset=UTF-8' \
-u phil:password123 \
-d '[{"name":"node1","description":"Primary node"},{"name":"node2","description":"Secondary node"}]'
Example response returning the new nodes:
[
{
"name": "node1",
"description: "Primary node"
},
{
"name": "node2",
"description: "Secondary node"
}
]
Deletes one or more nodes in a topology.
The DELETE request takes the following request payload:
Name | Type | Required | Description |
---|---|---|---|
| Array of Strings | Yes | One or more node names in the format |
The DELETE request returns the following response:
The following example demonstrates making a DELETE request to the /topologies/{topologyName}/nodes
endpoint.
Example cURL request to delete the "node1" and "node2" nodes in the "host" topology:
curl -X DELETE 'https://example.com/api/v1/topologies/host/nodes' \
-H 'Content-Type: application/json' \
-d ["node1","node2"] \
-u phil:password123