Role

Define roles and assign permissions.

Get organizations roles

get
/organizations/{organizationId}/roles

Get organizations roles by organization user

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
Query parameters
limitintegerOptional

The limit of per page

Default: 10
pageintegerOptional

Current page number

Default: 1
sortstringOptional

Sort

Example: {"value":"createdAt"}
textstringOptional

Text

privilegesstringOptional

Privileges

Responses
chevron-right
200

OK

application/json
and
get
/organizations/{organizationId}/roles

Create a organization role

post
/organizations/{organizationId}/roles

Create a organization role by organization user

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
Body
namestringOptional

Role name

Example: <name>
descriptionstringOptional

Role description

Example: <description>
privilegesstring[]Optional

Role privileges

Example: ["all:user:write"]
statusnumberOptional

Role status

Example: <status>
Responses
post
/organizations/{organizationId}/roles

Get a organization role

get
/organizations/{organizationId}/roles/{roleId}

Get a organization role by organization user

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
roleIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
Responses
chevron-right
200

OK

application/json
_idstringOptional

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
namestring · min: 2 · max: 100Required

Role name

descriptionstringOptional

Role description

privilegesstring[]Optional

Role privileges, formatted as (:)

Example: ["project:read","project:write"]
createdAtstring · date-timeRead-onlyRequired

Date

updatedAtstring · date-timeRead-onlyRequired

Date

get
/organizations/{organizationId}/roles/{roleId}

Update a organization role

put
/organizations/{organizationId}/roles/{roleId}

Update a organization role by organization user

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
roleIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
Body
namestringOptional

Role name

Example: <name>
descriptionstringOptional

Role description

Example: <description>
privilegesstring[]Optional

Role privileges

Example: ["all:user:write"]
statusnumberOptional

Role status

Example: <status>
Responses
chevron-right
200

OK

application/json
_idstringOptional

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
namestring · min: 2 · max: 100Required

Role name

descriptionstringOptional

Role description

privilegesstring[]Optional

Role privileges, formatted as (:)

Example: ["project:read","project:write"]
createdAtstring · date-timeRead-onlyRequired

Date

updatedAtstring · date-timeRead-onlyRequired

Date

put
/organizations/{organizationId}/roles/{roleId}

Delete a organization role

delete
/organizations/{organizationId}/roles/{roleId}

Delete a organization role by organization user

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
roleIdstringRequired

Entity ID

Pattern: ^[0-9a-fA-F]{24}$
Responses
delete
/organizations/{organizationId}/roles/{roleId}

No content

Last updated

Was this helpful?