Skip to content

Monitoring runs

Every pathway run exposes an automationStatus. Poll it to decide when to retry, raise an alert, or move on to the next step.

StatusTerminal?Meaning
queuedNoDefault. Created but not started (awaiting play or autoStart)
scheduledNoStarted, waiting for an automation worker
runningNoWork is actively executing
pausedNoPaused via API or UI
completedYesRequired work finished successfully
erroredYesA node failed (see error on the run)
canceledYesEnded by the caller (API or UI)
stoppedYesEnded by MedFlow without completing

Details: Automation status.

bash
curl "https://api-staging.medflow.care/v1/runs/RUN_ID" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"

Requires runs:read.

  • Poll every 2 to 5 seconds while running.
  • Back off to 15 to 30 seconds while queued, scheduled, or paused.
  • Stop when status is terminal.
  • Use If-None-Match / ETag when present.
bash
curl -X POST "https://api-staging.medflow.care/v1/runs/RUN_ID/cancel" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"

curl -X POST "https://api-staging.medflow.care/v1/runs/RUN_ID/pause" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"

curl -X POST "https://api-staging.medflow.care/v1/runs/RUN_ID/resume" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"

Requires runs:write. Each call is audited with your API key id.

bash
curl "https://api-staging.medflow.care/v1/triggers/TRIGGER_ID/status" \
  -H "Authorization: Bearer $MEDFLOW_API_KEY"

Aggregate counts are scoped to a trigger. Useful for monitoring and health checks without listing every run.

See Runs reference.