The Role object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

role_name string required
disabled boolean

Default: false

desk_access boolean

Default: true

two_factor_auth boolean

Default: false

is_custom boolean

Default: false

The Role object
{
  "id": "role_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "role_name": "role_name_example",
  "disabled": false,
  "desk_access": true,
  "two_factor_auth": false,
  "is_custom": false
}
GET /api/core/role/{id}

Retrieve a role

Retrieves the details of an existing role. Supply the unique role ID that was returned from a previous request.

Path parameters

id string required

The identifier of the role to retrieve.

Returns

Returns the role object if a valid identifier was provided.

GET /api/core/role/{id}
curl https://api.overplane.dev/api/core/role/role_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "role_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "role_name": "role_name_example",
  "disabled": false,
  "desk_access": true,
  "two_factor_auth": false,
  "is_custom": false
}
GET /api/core/role

List all roles

Returns a list of roles. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of role objects.

GET /api/core/role
curl https://api.overplane.dev/api/core/role \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "role_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "role_name": "role_name_example",
      "disabled": false,
      "desk_access": true,
      "two_factor_auth": false,
      "is_custom": false
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/core/role

Create a role

Creates a new role object.

Body parameters

role_name string required
disabled boolean

Default: false

desk_access boolean

Default: true

two_factor_auth boolean

Default: false

is_custom boolean

Default: false

Returns

Returns the newly created role object if the call succeeded.

POST /api/core/role
curl https://api.overplane.dev/api/core/role \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"role_name":"role_name_example"}'
Response
{
  "id": "role_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "role_name": "role_name_example",
  "disabled": false,
  "desk_access": true,
  "two_factor_auth": false,
  "is_custom": false
}
PATCH /api/core/role/{id}

Update a role

Updates the specified role by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the role to update.

Body parameters

role_name string
disabled boolean

Default: false

desk_access boolean

Default: true

two_factor_auth boolean

Default: false

is_custom boolean

Default: false

Returns

Returns the updated role object.

PATCH /api/core/role/{id}
curl https://api.overplane.dev/api/core/role/role_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"role_name":"role_name_example","disabled":false}'
Response
{
  "id": "role_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "role_name": "role_name_example",
  "disabled": false,
  "desk_access": true,
  "two_factor_auth": false,
  "is_custom": false
}
DELETE /api/core/role/{id}

Delete a role

Permanently deletes a role. This cannot be undone.

Path parameters

id string required

The identifier of the role to delete.

Returns

Returns a confirmation that the role has been deleted.

DELETE /api/core/role/{id}
curl https://api.overplane.dev/api/core/role/role_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "role_abc123",
  "deleted": true
}