You need a published Flow and its
flowId. Find both in the Diligent dashboard, or ask your Diligent contact.How a run works
Starting a run is asynchronous.POST /flows/{flowId}/runs validates the input, queues the run, and returns immediately with a run id. It does not wait for the Flow to finish.
The only way to read the result today is to poll GET /flow-runs/{runId} until status is terminal. There is no result in the trigger response, and no push of the finished report on the run API.
Typical statuses:
COMPLETED, FAILED, CANCELLED, and SKIPPED are terminal. Once a run reaches one of these, status does not change again.
Quick start
1. Trigger a run
input must match the Flow’s active version input schema. The fields below are an example — use the schema for your Flow.
202 Accepted):
id. That is the only handle you have for polling.
If input does not match the schema, the call fails immediately with 400 and does not queue a run:
404 with FLOW_NOT_FOUND means the flowId does not exist or belongs to another customer.
2. Poll the run
Call Get Run with theid from step 1. Repeat until status is terminal.
report is null until the run completes. Do not treat a missing report as a finished empty result.
3. Download structured output (optional)
Some Flows also write a structured output file (JSON). If Get Run showsoutput_ref set, request a short-lived download URL:
url before it expires (currently 300 seconds). If the run has no structured output, this endpoint returns 404 with OUTPUT_NOT_AVAILABLE.
Examples
Poll until the run finishes (bash)
Poll every 3 seconds and stop when the status is terminal. Then print the report.Poll until the run finishes (Python)
Failed run
When execution fails, polling still ends on a terminal status. Readerror instead of report.
Polling guidance
- Poll
GET /flow-runs/{runId}— that is the current way to learn status and readreport. - Start with a 2–5 second interval. Runs can take seconds to minutes depending on the Flow.
- Stop when
statusisCOMPLETED,FAILED,CANCELLED, orSKIPPED. - Persist the run
idin your system so you can resume polling after a restart. - Treat
reportas ready only whenstatusisCOMPLETED. - Call the output-url endpoint only after
output_refis set. The download URL expires quickly; fetch the file right away.