Bulk change role on assignments
/api/v1/assignments/bulk-change-roleReassigns a batch of existing assignments (assignment_ids) to a single new role_id in one atomic transaction. The target role must be active and non-system (400 otherwise); each assignment is authorized as rbac.manage_assignments at its node, and a change that would collide with an existing identity + role + node triple returns 409. All-or-nothing: any failure aborts the batch. Returns 200 with a { message } confirmation.
Authentication
Bearer Token
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
API Key
X-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 role_idstring Required Responses
application/json
data *MessageResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/api/v1/assignments/bulk-change-role" \ -H "X-API-Key: $CANOPY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "assignment_ids": [ "string" ], "role_id": "string" }'
{ "data": { "message": "string" } }
Tell us how we can improve this guide.