Get Role List
Memperoleh daftar Role dari resource.
URI
GET/api/v1/roles
Security
Type: Bearer Token
Query Parameter
| Name | Type | Field | Description |
|---|---|---|---|
page | string | optional | Berisi nomor halaman (page & limit harus terisi untuk mengaktifkan pagination). |
limit | string | optional | Berisi jumlah data per halaman (page & limit harus terisi untuk mengaktifkan pagination). |
keyword | string | optional | Berisi kata kunci pencarian. |
sort_by | string | optional | Berisi nama kolom dari resource untuk sortir data. |
sort_method | string | optional | Berisi metode sortir data. |
Examples
- URI
- Response
`{base_url}/api/v1/roles?page=1&limit=10`
{
"message": "Data tersedia",
"data": [
{
"id": 1,
"code": "administrator",
"name": "Administrator",
"description": "Admin",
"is_deleted": 0,
"is_system": 1,
"created_at": "2026-09-04T09:34:02.000Z",
"updated_at": "2026-09-04T04:28:41.000Z",
"created_by": 0,
"updated_by": 17,
"is_active": 1
},
{
"id": 2,
"code": "admin",
"name": "Admin",
"description": "Admin",
"is_deleted": 0,
"is_system": 0,
"created_at": "2026-09-04T04:29:55.000Z",
"updated_at": "2026-09-04T04:29:49.000Z",
"created_by": 0,
"updated_by": 17,
"is_active": 1
},
{
"id": 3,
"code": "operator",
"name": "Operator",
"description": "Operator",
"is_deleted": 0,
"is_system": 0,
"created_at": "2026-09-03T03:42:49.000Z",
"updated_at": "2026-09-03T03:42:49.000Z",
"created_by": 0,
"updated_by": 17,
"is_active": 1
},
...
],
"meta": {
"page": 1,
"limit": 10,
"total": 5,
"total_page": 1
}
}