Skip to main content

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:

ParameterTypeDefaultDescription
offsetinteger0Number of items to skip
limitinteger25Number of items to return
qstring-Search/filter query (optional)
sortstring-Field to sort by (optional)
directionstring-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 response
  • total_results (number) - Total items across all pages
  • result (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.

These endpoints support the q parameter:

  • GET /api/v3/speech-to-text/session
  • GET /api/v3/folders
  • GET /api/v3/tokens
  • GET /api/v3/subscriptions
  • GET /api/v3/invoices
  • GET /api/v3/custom_models
  • GET /api/v4/glossaries
  • GET /api/v3/reseller/customer
  • GET /api/v3/user_preferences

Backend endpoints:

  • GET /api/v3/admin/customer
  • GET /api/v3/admin/plan
  • GET /api/v3/admin/billing
  • GET /api/v3/admin/languageconfig
  • GET /api/v3/admin/usage
  • GET /api/v3/admin/usage/traffic
  • GET /api/v3/admin/stranded
  • GET /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_at
  • GET /api/v3/subscriptions - Sort with direction
  • GET /api/v3/invoices - Sort with direction
  • GET /api/v3/custom_models - Sort with direction
  • GET /api/v3/reseller/customer - Sort with direction
  • GET /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 sessions
  • GET /api/v3/folders - List folders
  • GET /api/v3/tokens - List API tokens
  • GET /api/v3/organization/user - List users
  • GET /api/v3/organization/group - List teams
  • GET /api/v3/subscription - List subscriptions
  • GET /api/v3/invoices - List invoices
  • GET /api/v3/custom_models - List custom models
  • GET /api/v4/glossaries - List glossaries
  • GET /api/v3/reseller/customer - List reseller customers
  • GET /api/v3/mandates - List mandates
  • GET /api/v3/user_preferences - List user preferences

Backend endpoints (admin access):

  • GET /api/v3/admin/customer - List customers
  • GET /api/v3/admin/plan - List plans
  • GET /api/v3/admin/billing - List billing items
  • GET /api/v3/admin/languageconfig - List language configs
  • GET /api/v3/admin/usage - List usage records
  • GET /api/v3/admin/usage/traffic - List transcript sessions
  • GET /api/v3/admin/stranded - List stranded sessions
  • GET /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