Project Data
This guide covers how to retrieve project metadata from Ditio, including project hierarchies, work breakdown structures (WBS / work orders), and the supporting catalogues you need to resolve IDs in other exports.
When to use this
Section titled “When to use this”- You need to map Ditio projects to your ERP or accounting system
- You want to display project structures in your BI tool
- You need WBS codes for cost allocation
- You’re building a dashboard that shows project-level KPIs
Prerequisites
Section titled “Prerequisites”- API credentials with the
reportingapiv1scope — see Authentication
# Test (default for all examples)export DITIO_REPORTING_BASE="https://core-api.ditio.dev/reporting"Available endpoints
Section titled “Available endpoints”| Endpoint | What it returns |
|---|---|
GET /v1/project | Project list with details |
GET /v1/project/work-breakdown-structure | Work breakdown structure (all work orders) |
GET /v1/resource | Equipment and resource catalogue |
GET /v1/user | User roster |
All are paginated with ContinuationToken and support incremental sync with
ModifiedSince — see Pagination.
Fetch projects
Section titled “Fetch projects”curl -H "Authorization: Bearer $TOKEN" \ "$DITIO_REPORTING_BASE/v1/project"Fetch the work breakdown structure
Section titled “Fetch the work breakdown structure”curl -H "Authorization: Bearer $TOKEN" \ "$DITIO_REPORTING_BASE/v1/project/work-breakdown-structure"Combining data (Python)
Section titled “Combining data (Python)”To build a complete picture, fetch projects, then WBS entries, then correlate by project ID:
import osfrom collections import defaultdictimport requests
REPORTING_BASE = os.environ.get( "DITIO_REPORTING_BASE", "https://core-api.ditio.dev/reporting")headers = {"Authorization": f"Bearer {TOKEN}"}
def extract_all(path): params = {} while True: page = requests.get( f"{REPORTING_BASE}{path}", headers=headers, params=params ).json() yield from page["data"] continuation = page.get("continuationToken") if not continuation: return params = {"ContinuationToken": continuation}
projects = list(extract_all("/v1/project"))wbs_entries = list(extract_all("/v1/project/work-breakdown-structure"))
wbs_by_project = defaultdict(list)for wbs_entry in wbs_entries: wbs_by_project[wbs_entry["projectId"]].append(wbs_entry)
for project in projects: codes = wbs_by_project.get(project["id"], []) print(f"{project['name']}: {len(codes)} WBS entries")Related
Section titled “Related”- Projects (Integration API) — creating and updating projects
- Work Orders (Integration API) — creating and updating work orders
- Export Time Data — time registrations reference project IDs
- Equipment Data — resource metadata for machines and equipment