Skip to content

Check a resource permission.

POST
/api/admin/resource-permissions/check
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/resource-permissions/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "subject_id": "user_123", "resource_type": "document", "resource_id": "doc_456", "action": "read" }'

Check whether a subject has a specific action on a resource using ID-level resource permissions.

Media type application/json
object
subject_id
required
string
resource_type
required
string
resource_id
required
string
action
required
string
key
additional properties
Example
{
"subject_id": "user_123",
"resource_type": "document",
"resource_id": "doc_456",
"action": "read"
}

Resource permission check response.

Media type application/json
object
allowed
required
boolean
subject_id
required
string
resource_type
required
string
resource_id
required
string
action
required
string
key
additional properties
Example generated
{
"allowed": true,
"subject_id": "example",
"resource_type": "example",
"resource_id": "example",
"action": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}