Skip to main content

List Roles

This API returns the list of roles available within the system that can be assigned to users.

Endpoint Details

URL/v1/auth/roles
MethodGET
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Response

Here is an example of a response when viewing a list of data:

Response
{
"roles": [
{
"id": "1",
"name": "Super Administrator",
"code": "superadmin"
},
{
"id": "2",
"name": "Administrator",
"code": "administrator"
},
{
"id": "3",
"name": "Stakeholder",
"code": "stakeholder"
},
{
"id": "4",
"name": "Member",
"code": "member"
}
]
}

Field Descriptions

FieldTypeDescription
rolesArrayList of roles available in the system
idStringUnique identifier of the role
nameStringDisplay name of the role
codeStringRole code used as the role_code when assigning a role to a user

info
  • A valid Bearer Token is required to access this endpoint.
  • The code value is used as the role_code when creating or updating a user.