How Data Extraction Works
Most integrations that read from Ditio — BI dashboards, data warehouses, payroll systems — follow the same five stages. This page is the map; each stage links to the page with the detail.
The five stages
Section titled “The five stages”-
Create an API client to get a client id and secret — see Creating API credentials.
-
Get a token with the
reportingapiv1scope, and reuse it until it expires — see Token Expiry. -
Call the endpoint on the reporting base with the token in the
Authorization: Bearerheader. Pick the endpoint for the data you want from the Data Extraction reference. -
Paginate through the result. Each response carries a
continuationToken; pass it back on the next call until it comes back empty. This works the same on every extraction endpoint except/v1/item-registrations/web-query— see Pagination. -
Sync changes on a schedule. Instead of re-pulling everything, pass
ModifiedSince(your last successful sync time) to get only records created or edited since then. Most endpoints also return deleted records, flagged withisDeleted;/v1/imagesdoesn’t.
Full vs incremental sync
Section titled “Full vs incremental sync”Seed your store with one full sync, then run incremental syncs on a timer. The two modes and their parameters are compared in Full vs incremental sync.
Which endpoint do I call?
Section titled “Which endpoint do I call?”| You want… | Endpoint | Page |
|---|---|---|
| Hours worked | v1/time-registrations | Time Registrations |
| Leave / absence | v1/absence-registrations | Absence Registrations |
| Machine usage | v1/machine-registrations | Machine Registrations |
| Mass-haul trips | v1/flow-trip-registrations | Mass Transport Registrations |
| HSE incidents & checklists | v1/incident-registrations, v1/checklist-registrations | Safety Reporting |
| Payroll result | v1/payroll-lines | Payroll Lines |
| Site photos | v1/images | Image Extraction |
To resolve the IDs that come back (userId, projectId, resourceId), pull
the matching metadata endpoint once and join on your side. userId joins
User Metadata’s identityUserId, not its id — see
Resolving cross-references.
Next steps
Section titled “Next steps”- Authentication — create the client and get a token
- Quickstart — the whole loop in a few calls
- Pagination — the continuation-token pattern in detail