Skip to content

Pagination

The Data Extraction API uses cursor-based pagination with ContinuationToken. This approach is reliable for large datasets — you won’t miss or duplicate records even if data changes between pages.

  1. First request: call the endpoint with your filter parameters (date range, project, etc.)
  2. Check the response: if there’s more data, the response includes a continuationToken
  3. Next page: pass the token back as the ContinuationToken query parameter (keep all other parameters the same)
  4. Repeat until no continuationToken is returned

Every Data Extraction endpoint returns this structure:

{
"data": [],
"links": {
"next": "/v1/time-registrations?FromDateTime=...&ContinuationToken=eyJ..."
},
"continuationToken": "eyJ..."
}
FieldDescription
dataArray of records for the current page
links.nextURL for the next page (convenience — you can also build it yourself)
continuationTokenOpaque token to pass as the ContinuationToken query parameter. Absent/empty when there are no more pages.

The extraction endpoints share a common filter model:

ParameterTypeDescription
FromDateTimedatetimeFull-sync window start
ToDateTimedatetimeFull-sync window end
ModifiedSincedatetimeIncremental sync: only records modified at/after this instant. Switches the ordering to modification time.
ModifiedBeforedatetimeUpper bound for incremental sync. Requires ModifiedSince and must be after it.
ProjectIdstringRestrict to one project
CompanyIdstringOnly data registered in (owned by) this company
OwnCompanyDataOnlyboolOnly data owned by the requesting company, excluding data shared from external companies
ExcludeDataFromSubsidiariesboolFor parent companies: exclude subsidiary data
ChunkLimitintTarget page size. Default 2500, clamped to 1–10000.
ContinuationTokenstringThe paging cursor

Metadata endpoints (project, user, resource) support the same model minus the FromDateTime/ToDateTime window.

ModeTriggerUse for
FullModifiedSince not setInitial backfill of a date window
IncrementalModifiedSince setOngoing sync — catches new and edited records; several endpoints also emit deletion tombstones (isDeleted: true) in this mode

The recommended pattern: one full sync to backfill, then scheduled incremental syncs passing ModifiedSince = <last successful sync timestamp>.

Terminal window
export DITIO_REPORTING_BASE="https://core-api.ditio.dev/reporting" # test
# Page 1
curl -H "Authorization: Bearer $TOKEN" \
"$DITIO_REPORTING_BASE/v1/time-registrations?FromDateTime=2026-01-01&ToDateTime=2026-12-31"
# Page 2 (using the continuation token from page 1)
curl -H "Authorization: Bearer $TOKEN" \
"$DITIO_REPORTING_BASE/v1/time-registrations?FromDateTime=2026-01-01&ToDateTime=2026-12-31&ContinuationToken=eyJwYWdl..."
# Continue until continuationToken is absent
  • Don’t parse the token. The ContinuationToken is an opaque string; its format may change.
  • Don’t modify filter parameters between pages. Once you start paginating, keep the filter identical and only add the token — changing filters restarts the stream.
  • Handle token expiry. If your access token expires mid-pagination, refresh it and continue with the same ContinuationToken.
  • Keep ModifiedSince tight. For incremental syncs, pass a timestamp close to your last successful sync — a far-back ModifiedSince on a large tenant is the heaviest query pattern.
  • Chunk large backfills. Prefer month-by-month FromDateTime/ToDateTime windows over one unbounded call.