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.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Unique name identifier of the role to delete. Must be alphanumeric with underscores, 1-64 characters.
Query parameters
Role name to reassign users to when deleting this role
Role name to reassign users to when deleting this role
Response
Role successfully deleted and users reassigned. No content returned.
Changes
No recorded changes to this operation across all 16 revisions of this API.