Skip to content

Check user permission

GET
/api/v1/rbac/check/permission/{permission}
curl --request GET \
--url https://localhost:8080/api/v1/rbac/check/permission/example \
--header 'Authorization: <Authorization>'

Report whether the authenticated user holds the given permission and which role scope satisfied it

permission
required
string

Permission name

Permission check result

Media type application/json

Whether the caller holds the requested permission, echoing what was checked

object
context
string
hasPermission
boolean
permission
string
projectId

The project reference as sent, or the project whose role granted the check

string
userId
string
Example
{
"context": "organization",
"hasPermission": true,
"permission": "manage_org_settings",
"projectId": "1",
"userId": "550e8400-e29b-41d4-a716-446655440001"
}

Unauthorized - Authentication required

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}