Storyden
Roles

Role Create

Creates a role with the specified permissions granted.

POST
/roles

Creates a role with the specified permissions granted.

Authorization

cookiestoryden-session<token>

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 POST 'https://example.com/api/roles' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "colour": "string",  "permissions": [    "CREATE_POST"  ]}'
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": {}}