Role
Define roles and assign permissions.
Get organizations roles by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Query parameters
limitintegerOptionalDefault:
The limit of per page
10pageintegerOptionalDefault:
Current page number
1sortstringOptionalExample:
Sort
{"value":"createdAt"}textstringOptional
Text
privilegesstringOptional
Privileges
Responses
200
OK
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
get
/organizations/{organizationId}/rolesCreate a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Body
namestringOptionalExample:
Role name
<name>descriptionstringOptionalExample:
Role description
<description>privilegesstring[]OptionalExample:
Role privileges
["all:user:write"]statusnumberOptionalExample:
Role status
<status>Responses
201
Created
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
post
/organizations/{organizationId}/rolesGet a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$roleIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Responses
200
OK
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
get
/organizations/{organizationId}/roles/{roleId}Update a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$roleIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Body
namestringOptionalExample:
Role name
<name>descriptionstringOptionalExample:
Role description
<description>privilegesstring[]OptionalExample:
Role privileges
["all:user:write"]statusnumberOptionalExample:
Role status
<status>Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
/organizations/{organizationId}/roles/{roleId}Delete a organization role by organization user
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$roleIdstringRequiredPattern:
Entity ID
^[0-9a-fA-F]{24}$Responses
204
No Content
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
delete
/organizations/{organizationId}/roles/{roleId}No content
Last updated
Was this helpful?

