Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Get started

IntroductionSend dataQuery dataPaginationAPI limits

Annotations

List all annotationsGETRetrieve annotationGETCreate annotationPOSTUpdate annotationPUTDelete annotationDELETE

API tokens

List all API tokensGETRetrieve API tokenGETCreate API tokenPOSTRegenerate API tokenPOSTDelete API tokenDELETE

Dashboards

Dashboard JSONList all dashboardsGETRetrieve dashboardGETCreate dashboardPOSTUpdate dashboardPUTPatch dashboard elementPATCHDelete dashboardDELETE

Datasets

List all datasetsGETRetrieve datasetGETList all fields in datasetGETRetrieve field in datasetGETCreate datasetPOSTIngest data (legacy)POSTRun APL query (legacy)POSTRun query (legacy)POSTTrim datasetPOSTUpdate datasetPUTUpdate fieldPUTVacuum datasetPOSTDelete fieldsPOSTDelete fieldDELETEDelete datasetDELETE

Edge

Ingest data to edge deploymentIngest Splunk HEC eventsIngest raw Splunk HEC eventsCheck Splunk HEC healthRun APL query to edge deploymentRun batch query to edge deploymentRun MPL query to edge deploymentGet metrics for a datasetFind metrics by tag valueGet metric tags for a datasetGet metric tag values for a datasetGet tags for a datasetGet tag values for a dataset

Labels

List all labelsGETRetrieve labelGETCreate labelPOSTUpdate labelPUTDelete labelDELETEList label assignmentsPOSTReplace label assignmentsPUT

Map fields

List all map fieldsGETCreate map fieldPOSTUpdate list of map fieldsPUTDelete map fieldsDELETE

Monitors

List all monitorsGETRetrieve monitorGETRetrieve monitor historyGETCreate monitorPOSTUpdate monitorPUTDelete monitorDELETE

Notifiers

List all notifiersGETRetrieve notifierGETCreate notifierPOSTUpdate notifierPUTDelete notifierDELETE

Organizations

List all orgsGETRetrieve orgGETCreate orgPOSTUpdate orgPUTProvision orgPOST

Role-based access control

List all rolesGETRetrieve roleGETList all groupsGETRetrieve groupGETCreate rolePOSTCreate groupPOSTUpdate rolePUTUpdate groupPUTDelete roleDELETEDelete groupDELETE

Saved queries

List all saved queriesGETRetrieve saved queryGETCreate saved queryPOSTUpdate saved queryPUTDelete saved queryDELETE

Users

Retrieve current userGETList all usersGETRetrieve userGETCreate userPOSTUpdate current userPUTUpdate user rolePUTDelete user from orgDELETE

Views

List all viewsGETRetrieve viewGETCreate viewPOSTUpdate viewPUTDelete viewDELETE

Virtual fields

List all virtual fieldsGETRetrieve virtual fieldGETCreate virtual fieldPOSTUpdate virtual fieldPUTDelete virtual fieldDELETE
Get started

Pagination in Axiom API

Learn how to paginate query results with the Axiom edge query API.

Use the edge APL query endpoint to retrieve events one page at a time. Axiom recommends timestamp-based pagination. Cursor-based pagination is in public preview and can distinguish events that share a timestamp.

Prerequisites

  • Create an Axiom account.
  • Create a dataset in Axiom where you send your data.
  • Create an API token in Axiom with permissions to ingest data to the dataset you have created.

Timestamp-based pagination

Sort by _time and use limit to set the page size. For example, this request returns up to 100 events, newest first:

shell
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/query/_apl?format=tabular' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "apl": "[\"DATASET_NAME\"] | sort by _time desc | limit 100",
    "startTime": "2026-11-01T00:00:00.000Z",
    "endTime": "2026-11-01T23:59:59.999Z"
  }'
Info

Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.

Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.

Replace DATASET_NAME with the name of the Axiom dataset where you send your data.

To fetch the next page, use the last event’s _time as the new boundary:

Sort orderChange for the next request
sort by _time descSet endTime to the last event’s timestamp. Keep startTime unchanged.
sort by _time ascSet startTime to the last event’s timestamp. Keep endTime unchanged.

The boundary is inclusive. Deduplicate repeated events in your client. Moving the boundary by a nanosecond can skip events that share that timestamp. If a full page shares a timestamp, use a cursor to continue through those events.

Cursor-based pagination

Use a non-aggregated query with a single sort on _time, such as the query above. Keep the query, page size, and time range fixed across requests.

  1. Send the first request without a cursor.
  2. Read the boundary cursor from the response. For descending order, use status.minCursor. For ascending order, use status.maxCursor.
  3. Send the same request with that value in the JSON body’s cursor field. By default the next page excludes the boundary event. Set includeCursor to true if you want to repeat it.
  4. Continue until a page contains fewer events than the requested page size.
Was this page helpful?
Suggest edits on GitHub
PreviousQuery data via Axiom APINextAPI limits
On this page
Timestamp-based paginationCursor-based pagination