PUT /api/topology/groups
Description
This method may be used to update a group's tags, or name only.
If a new set of services is passed they will be ignored and the original services kept. A group's set of services is updated via POST /api/topology/services/{groupID} and DELETE /api/topology/groups/{groupID}.
The id cannot be updated.
Resource URL
https://localhost:8090/api/topology/groups
Parameters
group | mandatory | The group with updated name or tags. This is passed in the request body. The id must be set. Refer to Javadoc for com.vordel.api.topology.model.Group . |
Response Codes
Response Code | Description | |
---|---|---|
200 | Success. The response body contains the updated group. | |
400 | The response contains an error e.g.:-
|
', '"', ':'. |
404 | The response contains an error indicating that the group does not exist. | |
500 | The response contains an error e.g. a failure occurred when propagating this topology update to other Node Managers. |
Example Request and Response
PUT https://localhost:8090/api/topology/groups
{
"id": "group-2",
"name": "GroupOne",
"tags": {
"country": "ie",
"city": "Dublin"
},
"services": [
{
"id": "instance-1",
"name": "APIServer1",
"type": "gateway",
"scheme": "https",
"hostID": "host-1",
"managementPort": 8085,
"tags": {},
"enabled": true
}
]
}
HTTP 1.1 200 OK
{
"result": {
"id": "group-2",
"name": "GroupOne",
"tags": {
"country": "ie",
"city": "Dublin"
},
"services": [
{
"id": "instance-1",
"name": "APIServer1",
"type": "gateway",
"scheme": "https",
"hostID": "host-1",
"managementPort": 8085,
"tags": {},
"enabled": true
}
]
}
}