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 |
| Method | GET |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must 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
| Field | Type | Description |
|---|---|---|
| roles | Array | List of roles available in the system |
| id | String | Unique identifier of the role |
| name | String | Display name of the role |
| code | String | Role 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
codevalue is used as therole_codewhen creating or updating a user.