Skip to main content
POST
/
workspace
/
roles
Create a Custom Role
curl --request POST \
  --url https://wks-a1b2c3d4.provisionr.io/api/v1/workspace/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "default_grant": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "default_grant": true,
  "timestamp": {
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z"
  },
  "count": {
    "workspace_permissions": 123,
    "workspace_logs_parent": 123,
    "workspace_logs_record": 123,
    "workspace_logs_related": 123,
    "workspace_users": 123
  },
  "included": {
    "workspace_permissions": [
      "<unknown>"
    ],
    "workspace_users": [
      "<unknown>"
    ]
  },
  "links": {
    "permissions": "<string>",
    "self": "<string>",
    "workspace_logs_parent": "<string>",
    "workspace_logs_record": "<string>",
    "workspace_logs_related": "<string>",
    "workspace_users": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.provisionr.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

CreateWorkspaceRoleRequestData

name
string
required

The name must be lowercase with only letters and periods. Use periods for word or namespace separation.

All custom roles are automatically prefixed with tenant.

Maximum string length: 55
Pattern: [\w.]+
Example:

"it.helpdesk"

default_grant
boolean
required

Whether all users should be granted this role by default when they authenticate.

Known Limitation: In the current version, this can only be set when the role is created. Changes will be supported in the future.

Example:

false

Response

WorkspaceRoleDetailedResponseData

id
string
required
Example:

"wsrol_01hq8xyzabc123def456ghi789"

name
string
required

The name of the role. All names are lowercase with only letters and periods. Periods are used for word or namespace separation. All custom roles are automatically prefixed with tenant.

Example:

"workspace.user.viewer"

default_grant
boolean
required

Whether this role is granted to all users by default when they authenticate

Example:

false

timestamp
TimestampBasicData · object
required

The timestamps for the workspace role record

count
object
required

Counts of related resources

included
object
required

Included related resources

API hyperlinks related to the workspace role record