Skip to main content
The FirstQuadrant API uses cursor-based pagination to efficiently navigate through large collections of resources. This approach provides consistent results even when data is being modified.

Pagination parameters

All collection endpoints support the following query parameters:

How it works

  1. Initial Request: Make a request without pagination parameters to get the first page
  2. Get Next Page: Use the id of the last item as startingAfter
  3. Get Previous Page: Use the id of the first item as endingBefore
  4. Check for More: If the returned items equal the limit, more pages may exist

Basic pagination example

Sorting results

You can sort results by any field that’s included in the response:

Getting total count

To get the total number of items without fetching all data, use the count endpoint:
You can also apply filters to the count endpoint:

Combining with filters

Pagination works seamlessly with filtering and search:

Best practices

1. Choose appropriate page sizes

  • Use smaller limits (10-25) for real-time UI updates
  • Use larger limits (50-100) for batch processing
  • Maximum limit is 100 items per request

2. Handle edge cases

3. Implement progress tracking

4. Optimize for performance

  • Use field selection to reduce payload size
  • Process pages in parallel when order doesn’t matter
  • Cache results when appropriate

Common patterns

Bidirectional navigation

Infinite scroll implementation

Troubleshooting

No results returned

If you’re not getting expected results:
  1. Check if filters are too restrictive
  2. Verify the cursor ID exists and belongs to the same resource type
  3. Ensure you’re not mixing startingAfter and endingBefore

Performance issues

For better performance:
  1. Use larger page sizes (up to 100)
  2. Limit the fields returned with select[]
  3. Use count endpoint separately instead of fetching all data
  4. Consider caching results for static data