# List Clients

`GET /lokta-lms/api/v1/clients`

The list capability of clients can support pagination and sorting.

Example Requests:

clients

clients?fields=displayName,officeName,timeline

clients?offset=10&limit=50

clients?orderBy=displayName&sortOrder=DESC

## Parameters
- `officeId` (query, integer): officeId
- `externalId` (query, string): externalId
- `displayName` (query, string): displayName
- `firstName` (query, string): firstName
- `lastName` (query, string): lastName
- `status` (query, string): status
- `underHierarchy` (query, string): underHierarchy
- `offset` (query, integer): offset
- `limit` (query, integer): limit
- `orderBy` (query, string): orderBy
- `sortOrder` (query, string): sortOrder
- `orphansOnly` (query, boolean): orphansOnly
- `legalForm` (query, integer)
- `staffId` (query, integer): staffId

## Responses
- `200`: OK

## Response fields
- `pageItems` (array of GetClientsPageItemsResponse)
- `totalFilteredRecords` (integer)

## Example request (cURL)
```bash
curl -X GET \
  'http://localhost:8080/lokta-lms/api/v1/clients' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

## Example response
```json
{
  "pageItems": [
    {}
  ],
  "totalFilteredRecords": 2
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/retrieveAllClients
