Obtain a system-level SMART Backend Services access token with system/*.read scope before initiating a system-level export
GET /$export?_since={ISO8601-datetime} with headers Accept: application/fhir+json and Prefer: respond-async; use the _since parameter to limit the export to resources updated after the last successful export
Store the kick-off timestamp before initiating the export; use this stored timestamp as the _since value on the next incremental export to avoid missing resources updated during the export window
Poll Content-Location until 200; parse the output manifest for resource type files and download each NDJSON file
Track the lastUpdated timestamps of downloaded resources to detect any resources that may have been updated between kick-off and completion, and reconcile them in a follow-up query if needed
Known gotchas
The _since parameter filters on meta.lastUpdated at the server level; resources with backdated lastUpdated values or resources updated by a backend process without updating lastUpdated will be missed by incremental exports
System-level $export exports all resources for all patients, including those not associated with any specific Group; ensure your processing pipeline can handle resources for patients outside your expected cohort
Some FHIR servers apply resource-type-level access controls at the system level even with system/*.read scope; resource types the token is not authorized for will be silently omitted from the export output rather than returning an error
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp