Pagination, Filtering & Sorting
Learn how to paginate, filter, and sort list endpoints to efficiently navigate and find specific resources.
Query Parameters
List endpoints support these query parameters based on the PagedListParams type:
| Parameter | Type | Default | Description |
|---|---|---|---|
offset | integer | 0 | Number of items to skip |
limit | integer | 25 | Number of items to return |
q | string | - | Search/filter query (optional) |
sort | string | - | Field to sort by (optional) |
direction | string | - | Sort direction: asc or desc (optional) |
Note: Default values are from application usage patterns. The limit default of 25 is used consistently across the application.
Pagination
Response Format
All paginated endpoints return results in this format based on the BaseResponse type:
{
"count": 25,
"total_results": 150,
"result": [...]
}
Fields:
count(number) - Number of items in current responsetotal_results(number) - Total items across all pagesresult(array) - Array of items for current page
Example Usage
# Get first page (items 0-24)
GET /api/v3/speech-to-text/session?limit=25&offset=0
# Get second page (items 25-49)
GET /api/v3/speech-to-text/session?limit=25&offset=25
# Get third page (items 50-74)
GET /api/v3/speech-to-text/session?limit=25&offset=50
Filtering
Use the q parameter to search and filter results.
Endpoints Supporting Search
These endpoints support the q parameter:
GET /api/v3/speech-to-text/sessionGET /api/v3/foldersGET /api/v3/tokensGET /api/v3/subscriptionsGET /api/v3/invoicesGET /api/v3/custom_modelsGET /api/v4/glossariesGET /api/v3/reseller/customerGET /api/v3/user_preferences
Backend endpoints:
GET /api/v3/admin/customerGET /api/v3/admin/planGET /api/v3/admin/billingGET /api/v3/admin/languageconfigGET /api/v3/admin/usageGET /api/v3/admin/usage/trafficGET /api/v3/admin/strandedGET /api/v3/admin/priority-queue
Example Usage
# Search for sessions containing "meeting"
GET /api/v3/speech-to-text/session?q=meeting
# Search for customers
GET /api/v3/reseller/customer?q=acme
Sorting
Use sort and direction parameters to order results.
Endpoints Supporting Sorting
These endpoints support sort and direction parameters:
GET /api/v3/folders- Sort by name, created_at, updated_atGET /api/v3/subscriptions- Sort with directionGET /api/v3/invoices- Sort with directionGET /api/v3/custom_models- Sort with directionGET /api/v3/reseller/customer- Sort with directionGET /api/v3/speech-to-text/session- Sort support
Example Usage
# Sort folders by name (ascending)
GET /api/v3/folders?sort=name&direction=asc
# Sort sessions by creation date (descending)
GET /api/v3/speech-to-text/session?sort=created_at&direction=desc
Combined Usage
You can combine pagination, filtering, and sorting in a single request:
# Search for "meeting", sort by date (newest first), get second page
GET /api/v3/speech-to-text/session?q=meeting&sort=created_at&direction=desc&limit=25&offset=25
Paginated Endpoints
These endpoints support pagination:
GET /api/v3/speech-to-text/session- List transcription sessionsGET /api/v3/folders- List foldersGET /api/v3/tokens- List API tokensGET /api/v3/organization/user- List usersGET /api/v3/organization/group- List teamsGET /api/v3/subscription- List subscriptionsGET /api/v3/invoices- List invoicesGET /api/v3/custom_models- List custom modelsGET /api/v4/glossaries- List glossariesGET /api/v3/reseller/customer- List reseller customersGET /api/v3/mandates- List mandatesGET /api/v3/user_preferences- List user preferences
Backend endpoints (admin access):
GET /api/v3/admin/customer- List customersGET /api/v3/admin/plan- List plansGET /api/v3/admin/billing- List billing itemsGET /api/v3/admin/languageconfig- List language configsGET /api/v3/admin/usage- List usage recordsGET /api/v3/admin/usage/traffic- List transcript sessionsGET /api/v3/admin/stranded- List stranded sessionsGET /api/v3/admin/priority-queue- List priority queue items
Special Cases
Organization Groups
The groups endpoint has a hardcoded limit:
GET /api/v3/organization/group?limit=100&offset=0
Glossaries
Glossary entries have a default limit of 1000:
GET /api/v4/glossaries/{id}?include_entries=true&limit=1000
Team Users and Subscription Plans
Some endpoints use limit=1000 by default in the application:
GET /api/v3/organization/group/{id}/users?limit=1000
GET /api/v3/reseller/plan?limit=1000
Related Documentation
- API Overview - API introduction
- Errors - Handling errors