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 in the Ditio backoffice to get a client id and secret, scoped to the data you need. See Authentication.
-
Get a token by exchanging those credentials at the identity server. Tokens are short-lived — cache one and reuse it until it expires rather than fetching a new one per call.
-
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 is the same for every extraction endpoint — see Pagination. -
Sync changes on a schedule. Instead of re-pulling everything, pass
ModifiedSince(your last successful sync time) to get only records created, edited, or deleted since then — including deletions, flagged withisDeleted.
Full vs incremental sync
Section titled “Full vs incremental sync”| Full sync | Incremental sync | |
|---|---|---|
| Trigger | FromDateTime + ToDateTime | ModifiedSince (+ optional ModifiedBefore) |
| Returns | Everything in the date window | Only records changed since your last sync |
| Use for | The first load, or a full re-sync | Every scheduled run after the first |
| Catches edits to old records? | No | Yes |
The usual pattern is one full sync to seed your store, then incremental syncs on a timer (nightly or hourly) forever after.
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 — see the
Data Model.
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