Skip to content

Remove label from group

POST
/api/v1/groups/labels/remove
curl --request POST \
--url http://localhost:3000/api/v1/groups/labels/remove \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "labelSelector": { "environment": "production", "region": "us-west" }, "key": "tier" }'

Removes a label from all devices matching a selector.

Media type application/json
object
labelSelector
required

Label selector to match devices

object
key
additional properties
string
Example
{
"environment": "production",
"region": "us-west"
}
key
required

Label key to remove

string
Example
tier

Label removed successfully

Media type application/json
object
affected
required

Number of devices affected by the operation

number
deviceIds
required

IDs of affected devices

Array<string>
Example
{
"affected": 15,
"deviceIds": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}

Bad Request

Unauthorized

Forbidden — caller lacks required permission