rolePermissions
Requires at least one of the permissions settings:permission:read or settings:role:read.
Lists the permissions granted to a role in your organization. Needs the roles read or permissions read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query RolePermissions($roleId: ID!) {
rolePermissions(roleId: $roleId) {
id
name
createdAt
action
description
direct
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query RolePermissions($roleId: ID!) {\n rolePermissions(roleId: $roleId) {\n id\n name\n createdAt\n action\n description\n direct\n }\n}",
"variables": {
"roleId": "id"
}
}
EOF
Variables:
{
"roleId": "id"
}
Response:
{
"data": {
"rolePermissions": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"description": "string",
"direct": true
}
]
}
}
rolePermissions(
roleId: ID!
): [Permission!]!
Arguments
rolePermissions.roleId ● ID! non-null scalar
The ID of the role.
Type
Permission object
A permission.