1. Docs
  2. API Reference
  3. Bulk remove assignments

Bulk remove assignments

POST/api/v1/assignments/bulk-remove

Removes multiple assignments in a single atomic transaction given an array of assignment_ids. Every id is resolved and individually authorized as rbac.manage_assignments at its node before any deletion occurs — if any id is missing or unauthorized the whole batch fails and nothing is removed (all-or-nothing). Responds 204 No Content and emits one assignment.bulk_removed audit event listing the affected identities, nodes, and roles.

Authentication

Bearer TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-API-Key Option B

API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.

Request body

application/json

assignment_idsstring[] Required

Responses

Assignments removed

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*
Request
curl -X POST "https://auth.canopy-io.com/api/v1/assignments/bulk-remove" \
  -H "X-API-Key: $CANOPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assignment_ids": [
      "string"
    ]
  }'
Response
HTTP/1.1 204 Assignments removed

(empty body)
Related endpoints
GETList all assignments across the Application
GETGet App-wide assignment summary
POSTAssign a role to an identity at a node
PATCHUpdate an assignment
DELETERemove an assignment
POSTBulk change role on assignments
POSTBulk-create role assignments. All-or-nothing: any failure rolls back the entire batch
Was this page helpful?

Tell us how we can improve this guide.