Diagrams
Auth: API key. Scope: diagrams:read
Base path: /v1/diagrams
A diagram is a care pathway. Blueprints and instances are both Diagram objects, distinguished by a type:
| Type | What it is | How it is created |
|---|---|---|
blueprint | The pathway template (swimlanes, nodes, links) | In the MedFlow UI only |
instance | A copy of a blueprint, made to be run | When a run starts |
Every diagram has its own id. On an instance, sourceId is the blueprint it was copied from. A run’s runId is the id of its instance.
The Diagrams API is read-only. Create, edit, rename, and delete pathways in the MedFlow UI. Use this API to list and fetch diagram metadata.
GET /v1/diagrams
curl "https://api-staging.medflow.care/v1/diagrams" \
-H "Authorization: Bearer $MEDFLOW_API_KEY"| Query | Description |
|---|---|
type | Optional. blueprint or instance. Defaults to blueprint |
sourceId | Optional. Instances copied from this blueprint |
q | Optional name search |
limit | Max results (default 25, max 100) |
cursor | Pagination cursor |
GET /v1/diagrams/:id
Returns metadata (id, type, name, and sourceId when type is instance).
curl "https://api-staging.medflow.care/v1/diagrams/DIAGRAM_ID" \
-H "Authorization: Bearer $MEDFLOW_API_KEY"