Remove label from group
POST
/api/v1/groups/labels/remove
const url = 'http://localhost:3000/api/v1/groups/labels/remove';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"labelSelector":{"environment":"production","region":"us-west"},"key":"tier"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” 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
tierResponses
Section titled “ Responses ”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