Get Roles API
Welcome to the documentation for the Get Roles API. This API returns all role created.
Base URL
{baseURL}/v1/accounts/settings/roles | GET
Authorization
Include the following Authorization header in your HTTP requests using a Bearer token:
Authorization: Bearer YOUR_ACCESS_TOKEN
Sample Request
curl -X GET {baseURL}/v1/accounts/settings/roles \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
Sample 200 Response
{
"message": "Accounts retrieved successfully",
"data": [
{
"_id": "64f4b7b31dca9276ea1f786b",
"account_id": "650335d818515d90244388c7",
"name": "admin",
"slug": "admin",
"permissions": [],
"createdAt": "2023-09-03T16:43:31.033Z",
"updatedAt": "2023-09-03T16:43:31.033Z",
"__v": 0,
"role_id": "64f4b7b31dca9276ea1f786b"
},
{
"_id": "6516057ce2abecf6a9a93ec9",
"account_id": "650335d818515d90244388c7",
"name": "Admin",
"slug": "admin",
"permissions": [],
"createdAt": "2023-09-28T23:00:12.830Z",
"updatedAt": "2023-09-28T23:00:12.830Z",
"__v": 0,
"role_id": "6516057ce2abecf6a9a93ec9"
}
],
"success": true
}