v4

latestOpenAPI 3.1.1Apache 2.02026-07-31107278570.4 KB
Roles

Delete role and reassign users

Permanently removes a role from the environment and reassigns users who had that role to a different role. Use this endpoint when you need to clean up unused roles or restructure your access control system. The role cannot be deleted if it has dependent roles (roles that extend it) unless you specify a replacement role. If users are assigned to the role being deleted, you must provide a reassign_role_name to move those users to a different role before deletion can proceed. This action cannot be undone, so ensure no critical users depend on the role before deletion.

delete/api/v1/roles/{role_name}

Path parameters

role_namestring required

Unique name identifier of the role to delete. Must be alphanumeric with underscores, 1-64 characters.

Query parameters

reassign_role_idstring

Role name to reassign users to when deleting this role

reassign_role_namestring

Role name to reassign users to when deleting this role

Response

Role successfully deleted and users reassigned. No content returned.

{"stackTrail":"paths:/api/v1/roles/{role_name}:delete:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}