Storyden
Roles

Role Update Order

Update the global ordering of custom roles. The request body must include every non-default role identifier exactly once in the desired order of precedence.

PATCH
/roles/order

Update the global ordering of custom roles. The request body must include every non-default role identifier exactly once in the desired order of precedence.

Authorization

cookiestoryden-session<token>

Request Body

application/json
  1. body
role_ids*array<>

Ordered list of custom role identifiers in the desired sort order. Must include all custom roles exactly once without default roles.

Response Body

OK

application/json
  1. response
roles*array<>
Example Request
curl -X PATCH 'https://example.com/api/roles/order' \  -H 'Content-Type: application/json' \  -d '{  "role_ids": [    "string"  ]}'
Example Response
{  "roles": [    {      "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": {}    }  ]}