Roles
Roles are a way to group users together. They can be used to grant permissions to a group of users, or to identify a group of users for other purposes, such as identifying staff members or those who have signed an NDA.
List roles
Returns all role objects.
Authentication
Service Integration with user:read scope.
Response
nextPagestring (optional)A cursor for pagination across multiple pages of results. If this attribute is present, there are more results available. Use this value in the nextPage parameter for the next request.
curl https://reg.cces.dev/api/v0/roles \
-H "Authorization: Bearer <token>"
{
"data": [
{
"id": "1234",
"name": "staff"
},
],
"nextPage": null
}
List user roles
List the roles given to the specified user.
Authentication
Service Integration with user:read scope.
Response
{
"data": [
{
"id": "1234",
"name": "admin",
"scope": "global",
}
]
}
Add role to an user
Gives the user the specified role. This request will fail if the user already has the role.
Authentication
Service Integration with user:roles:update scope.
Request
scopestringWhatever the role will be given to the user for the current convention, or across all conventions in the organization. Values can be "convention" or "global".
{
"scope": "convention"
}
Remove role from an user
Removes the user from the specified role. This request will fail if the user is not in the role.
Authentication
Service Integration with user:roles:update scope.