Storyden
Roles

Role Update

Update a role's attributes. Requires MANAGE_ROLES. Updating a role that already grants ADMINISTRATOR, or granting ADMINISTRATOR to a role, additionally requires ADMINISTRATOR. Updates that would leave no active account with ADMINISTRATOR are rejected with 400.

PATCH
/roles/{role_id}

Update a role's attributes. Requires MANAGE_ROLES. Updating a role that already grants ADMINISTRATOR, or granting ADMINISTRATOR to a role, additionally requires ADMINISTRATOR. Updates that would leave no active account with ADMINISTRATOR are rejected with 400.

Authorization

cookiestoryden-session<token>

Path Parameters

role_id*string

Role ID

Formatxid

Request Body

application/json
  1. body
name?string
colour?string
permissions?array<>
meta?

Arbitrary metadata for the resource.

Response Body

OK

application/json
  1. response
id*Identifier

A unique identifier for this resource.

Formatxid
createdAt*string

The time the resource was created.

Formatdate-time
updatedAt*string

The time the resource was updated.

Formatdate-time
deletedAt?string

The time the resource was soft-deleted.

Formatdate-time
misc?

Arbitrary extra data stored with the resource.

name*string
colour*string
permissions*array<>
meta?

Arbitrary metadata for the resource.

Example Request
curl -X PATCH 'https://example.com/api/roles/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "deletedAt": "2019-08-24T14:15:22Z",  "misc": {},  "name": "string",  "colour": "string",  "permissions": [    "CREATE_POST"  ],  "meta": {}}