Skip to main content

Follow runs

Read a run's state until it ends, and then its outputs. Needs runs:read.

Poll with a wait​

Call getOrchestratorRun with ?wait=15. It answers as soon as the run ends, or after 15 seconds with its current state:

curl "$GHOSTPULL_URL/api/v1/orchestrator/runs/$ADDON_ID/$RUN_ID?wait=15" \
-H "x-api-key: $GHOSTPULL_API_KEY"

Call again while status is RUNNING. Once it is SUCCEEDED, the answer holds the run's outputs, with signed download links that expire.

Stream instead of polling​

streamOrchestratorRun sends the same state as Server-Sent Events: once at once, and again on every change. The stream closes when the run ends, or after 15 minutes; connect again to go on.