Skip to content

List roles and the capabilities attached to each

GET
/auth/roles

Lists every role, sorted by name, with the capabilities attached to each one directly. A role also has everything its parent role has, and so on up the chain, so follow parent_id to work out a role’s full set.

Needs the roles.read capability. To see what your own account can do, call GET /auth/me/capabilities.

Every role on this instance.

Array<object>
object
id
required
string format: uuid
name
required
string
description
required
string
parent_id

The role this one inherits from. Left out if it has no parent.

string format: uuid
nullable
capabilities
required

Capability codes attached directly to this role. Capabilities it inherits through parent_id aren’t included.

Array<string>

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed