The permission catalogue plus, for each role, what it grants.
const url = 'https://example.com/api/v1/roles';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/roles \ --header 'Authorization: Bearer <token>'Only View, unlike the rest of this module: it is the shape of the permission model, not
anyone’s account. Derived from Permission::ALL and Role::ALL rather than listed here, so a
new permission appears in the matrix without anyone remembering to add it.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The permission catalogue and what each role grants
The role-vs-privilege matrix.
object
One permission in the role/privilege matrix.
object
One role in the matrix: its metadata and the permission keys it grants.
object
Built-in roles are fixed (custom roles are not configurable yet).
The keys of the permissions this role grants.
Examplegenerated
{ "permissions": [ { "description": "example", "key": "example", "label": "example" } ], "roles": [ { "builtin": true, "description": "example", "key": "example", "label": "example", "permissions": [ "example" ] } ]}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks read access
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}