PUT/v1/monitor-groups/{group_id}

Update a monitor group

Renames or moves a monitor group. Only the fields you send change.

Request

Path Parameters
group_idnumberrequired
Identifier of the group, as returned by Get all monitor groups
Example:12
Bodyapplication/json
group_namestringoptional
New name of the group. It must not match another group in the same project.
sort_ordernumberoptional
New position of the group in the list

Send at least one of the two fields. To move a monitor into or out of a group, update the monitor's group_id with Update a monitor.

Response

Returns the group identifier and the fields that changed, with status code 200.

Errors

Error responses
400No updates provided
The body has neither group_name nor sort_order
400A group with this name already exists
Another group in the project already uses that name
404Monitor group not found
No group with this identifier in the project of the API key
403read-only key
The API key has read-only permissions
RequestcURL
curl -X PUT https://api.hyperping.io/v1/monitor-groups/12 \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "group_name": "Production EU"
  }'
200 OKJSON
{
  "group_id": "12",
  "group_name": "Production EU"
}
404 Not FoundJSON
{
  "message": "Monitor group not found"
}