Skip to content

Bulk update labels

PATCH
/api/v1/groups/labels
curl --request PATCH \
--url http://localhost:3000/api/v1/groups/labels \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "labelSelector": { "environment": "staging" }, "labels": { "tier": "production", "version": "v2.0" } }'

Bulk updates labels on devices matching a selector.

Media type application/json
object
labelSelector
required

Label selector to match devices

object
key
additional properties
string
Example
{
"environment": "staging"
}
labels
required

Labels to add or update on matching devices

object
key
additional properties
string
Example
{
"tier": "production",
"version": "v2.0"
}

Labels updated 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