Get list of departments with pagination
Department Information
List Departments
Admin-only endpoint to retrieve a list of departments. - If both start and end are 0, all departments are returned. - Otherwise, returns departments between the given start and end indexes (zero-based).
GET
Get list of departments with pagination
Admin-only endpoint to retrieve a list of departments with pagination support.
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | integer | Yes | Starting index (0 for beginning) |
| end | integer | Yes | Ending index (0 to return all departments) |
Response
200 OK - Successfully retrieved department list
401 Unauthorized
500 Internal Server Error
Examples
Get first 10 departments
Get all departments
Get departments 11-20
Notes
- This is an admin-only endpoint - requires administrative privileges
- Pagination is zero-based (start at 0)
- Setting both start and end to 0 returns all departments
- The response includes a total count for pagination controls
- Departments are returned as a flat list without hierarchy
- Use the
/department/hierarchyendpoint for hierarchical view - Departments are sorted by creation date (newest first)
- The list includes both parent and child departments
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Starting index (0 for beginning)
Required range:
x >= 0Ending index (0 to return all departments)
Required range:
x >= 0