Unified RBAC API Codes
The Unified Role-Based Access Control (RBAC) API uses the following response codes and error messages.
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request was successful. |
| 201 | Created | The request was successful, and a new resource has been created. |
| 202 | Accepted | The request has been accepted for processing, but processing has not yet completed. |
| 204 | No Content | There is no content to send for this request, but the headers might be useful. |
| 400 | Bad Request | The request could not be processed due to invalid parameters or syntax, or malformed JSON body. |
| 401 | Unauthorized | The session is not authenticated due to an invalid, missing, or expired token. |
| 403 | Forbidden | The request fails due to insufficient scope or access to the resource. |
| 404 | Not Found | The resource could not be found. |
| 500 | Internal Server Error | An unexpected server issue occurred, preventing the request from being processed. |
The following sections provide response codes used by different requests in specific scenarios.
POST /v1/roles
201: The request has succeeded, and a new resource has been created as a result.202: The request has been accepted for processing, but processing has not yet completed.400: The request could not be processed due to one of the following reasons: null role, empty or invalid role name, empty actions, invalid tenant, unknown action, or disallowed restriction characters.401: Access is unauthorized.403: The action specified in the request is not entitled for the tenant.500: Internal server error that can occur due to duplicate role names or an unexpected failure.
POST /v1/roles/query
200: The request has succeeded, and a new resource has been created as a result.202: The request has been accepted for processing, but processing has not yet completed.400: The server could not understand the request due to unsupported filter fields or request issues.401: Access is unauthorized.500: Internal server error caused by an unexpected failure.
PUT /v1/roles/{roleId}
201: The request was successful.400: The server could not understand the request due to invalid syntax. This can occur due to payload invalidation or mismatched role ID in request body vs. path.401: Access is unauthorized.404: Role does not exist.403: Request is forbidden when attempting to modify a predefined role or action that is not entitled.500: Internal server error that can occur from role name conflict (new role shares the same identifier as an existing role), optimistic locking failure caused by simultaneous updates of an entity by two or more API clients, or an unexpected failure.
GET /v1/roles/{roleId}
200: The request has succeeded.401: Access is unauthorized.404: Role is not found.500: Internal server error due to an unexpected failure.
DELETE /v1/roles/{roleId}
200: The request has succeeded.204: There is no content to send for this request, but the headers might be useful.400: The request could not be processed because the role has active assignments.401: Access is unauthorized.404: Role is not found.403: Request is forbidden because it's identified as an attempt to delete a predefined role.500: Internal server error that can be caused by issues in verifying active role assignments or an unexpected failure.
POST /v1/auditlog/query
201: The request has succeeded, and a new resource has been created as a result.202: The request has been accepted for processing, but processing has not yet completed.400: The request could not be processed due to a disallowed sort or filter field or an unsupported operator, or a malformed request body.401: Access is unauthorized.500: Server error that can occur due to a missing Authentication Service tenant ID in the audit context or other cause for failures.