Pagination

All top-level resources support pagination. All Find methods return a list of results along with pagination details. Each query can return up to 100 results. The most performant and reliable method for pagination is cursor-based, but offset-based pagination is also supported.

Cursor-Based Pagination

Cursor-based pagination is enabled by including a cursor parameter in the query string, for example: ?cursor=....

If the cursor is empty, results begin at the start of the dataset (by default ordered by ascending id).

{
  "next": "https://sandbox.elationemr.com/api/2.0/allergies?cursor=cD0xMDYxNzEyNjg0Nzc3NDk2",
  "previous": null,
  "results": [
    { ... },
    { ... },
    { ... }
  ]
}
  • next: URL for the next page of results
  • previous: URL for the previous page (if available)
  • results: The current page of data

Offset-Based Pagination

If a cursor parameter is not provided, the API defaults to offset-based pagination. This method uses the limit and offset parameters.

{
  "count": 123,
  "next": "https://sandbox.elationemr.com/api/2.0/allergies/?limit=10&offset=10",
  "previous": "https://sandbox.elationemr.com/api/2.0/allergies/?limit=10",
  "results": [
    { ... },
    { ... },
    { ... }
  ]
}
  • count: The total number of items in the full result set
  • next: URL for the next page of results
  • previous: URL for the previous page of results
  • results: The current page of data

Summary: Use cursor-based pagination whenever possible for the best performance and reliability. Offset-based pagination remains available for compatibility.