Roles

Endpoints related to managing a hub's role based access controls.

List Hub Roles

Lists the Roles that have been created for this Hub.

Requires the hubs-roles-manage capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

filter
object
object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

meta
Array of strings

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

Items Value: "counts"
Responses
200

Returns a list of Hub Roles.

default

General error response from the platform

get/v1/hubs/current/roles
Response samples
application/json
{
  • "data": [
    ]
}

Create Hub Role

Creates a custom Role for a Hub.

Requires the hubs-roles-manage capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for creating a new Hub Role.

name
string or null

A name given to the Role.

identifier
required
string
object or null

The list of platform level capabilities assigned to this Role.

rank
required
integer

An integer between 0 and 10 that indicates the Role hierarchy. An account can only edit a Role that is less than their rank. The 'owner' Role is rank 10.

object or null

Custom user-defined properties for storing extra information on the Role. Not utilized by Cycle.

Responses
201

Returns a Hub Role.

default

General error response from the platform

post/v1/hubs/current/roles
Request samples
application/json
{
  • "name": "string",
  • "identifier": "string",
  • "capabilities": {
    },
  • "rank": 0,
  • "extra": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get Hub Role

Retrieves the specified Role.

Requries the hubs-roles-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
roleId
required
string

The ID of the Role.

query Parameters
meta
Array of strings

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

Items Value: "counts"
Responses
200

Returns a Role.

default

General error response from the platform

get/v1/hubs/current/roles/{roleId}
Response samples
application/json
{
  • "data": {
    }
}

Update Hub Role

Updates various properties of a specific Role.

Requires the hubs-roles-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
roleId
required
string

The ID of the Role.

Request Body schema: application/json
name
string or null

A name given to the Role.

identifier
required
string
object or null

The list of platform level capabilities assigned to this Role.

rank
required
integer
object or null

Custom user-defined properties for storing extra information on the Role. Not utilized by Cycle.

Responses
200

Returns the updated Hub Role.

default

General error response from the platform

patch/v1/hubs/current/roles/{roleId}
Request samples
application/json
{
  • "name": "string",
  • "identifier": "string",
  • "capabilities": {
    },
  • "rank": 0,
  • "extra": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Delete Hub Role

Marks a Role as 'deleted'.

Requires the 'hubs-roles-manage' capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
roleId
required
string

The ID of the Role.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

delete/v1/hubs/current/roles/{roleId}
Response samples
application/json
{
  • "data": {
    }
}