GET
/
api
/
roles
/
{id}
{
  "id": 1,
  "slug": "admin",
  "name": "Administrator",
  "description": "Administrator role with all permissions",
  "predefined": false,
  "permissions": [
    {
      "ability": "read",
      "subject": "item",
      "value": true
    },
    {
      "ability": "edit",
      "subject": "item",
      "value": false
    }
  ]
}

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Path Parameters

id
number
required

Role ID

Response

200 - application/json

Role details

id
number
required

Unique identifier of the role

Example:

1

slug
string
required

The slug of the role

Example:

"admin"

name
string
required

The name of the role

Example:

"Administrator"

description
string
required

The description of the role

Example:

"Administrator role with all permissions"

predefined
boolean
required

Indicates if the role is predefined

Example:

false

permissions
object[]
required

List of permissions associated with the role

Example:
[
{
"ability": "read",
"subject": "item",
"value": true
},
{
"ability": "edit",
"subject": "item",
"value": false
}
]