Skip to main content
GET
/
api
/
v1
/
roles
/
List all roles
curl --request GET \
  --url https://services.pref.rio/heimdall-admin/api/v1/roles/ \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "id": 1,
      "name": "superadmin",
      "description": "Super administrator with full system access"
    },
    {
      "id": 2,
      "name": "data_analyst:read",
      "description": "Data analysts with read access to analytics dashboards",
      "created_by": "12345678901",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "total": 25,
  "skip": 0,
  "limit": 50,
  "has_more": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

skip
integer
default:0

Number of items to skip

Required range: x >= 0
limit
integer
default:50

Maximum number of items to return

Required range: 1 <= x <= 100

Response

List of roles retrieved successfully

items
RoleResponse · object[]
required

List of items for the current page

total
integer
required

Total number of items available

Required range: x >= 0
Example:

150

skip
integer
required

Number of items skipped (offset)

Required range: x >= 0
Example:

0

limit
integer
required

Maximum number of items returned

Required range: 1 <= x <= 100
Example:

50

has_more
boolean
required

Whether there are more items available

Example:

true