Skip to content

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.

  • 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
  • API credentials with the reportingapiv1 scope — see Authentication
Terminal window
# Test (default for all examples)
export DITIO_REPORTING_BASE="https://core-api.ditio.dev/reporting"
EndpointWhat it returns
GET /v1/projectProject list with details
GET /v1/project/work-breakdown-structureWork breakdown structure (all work orders)
GET /v1/resourceEquipment and resource catalogue
GET /v1/userUser roster

All are paginated with ContinuationToken and support incremental sync with ModifiedSince — see Pagination.

Terminal window
curl -H "Authorization: Bearer $TOKEN" \
"$DITIO_REPORTING_BASE/v1/project"
Terminal window
curl -H "Authorization: Bearer $TOKEN" \
"$DITIO_REPORTING_BASE/v1/project/work-breakdown-structure"

To build a complete picture, fetch projects, then WBS entries, then correlate by project ID:

import os
from collections import defaultdict
import 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")