curl --request GET \
--url https://api.godiligent.ai/flow-runs/{runId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.godiligent.ai/flow-runs/{runId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.godiligent.ai/flow-runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.godiligent.ai/flow-runs/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.godiligent.ai/flow-runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.godiligent.ai/flow-runs/{runId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/flow-runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "<string>",
"flow_id": "<string>",
"flow_version_id": "<string>",
"status": "QUEUED",
"triggered_at": "2023-11-07T05:31:56Z",
"trigger_type": "manual",
"triggered_by": "<string>",
"input": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"skip_reason": "<string>",
"report": "<string>",
"output_ref": "<string>",
"log_ref": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"step": "<string>",
"transient": true
},
"meta": {},
"records": [
{}
],
"run_mode": "rehearsal",
"act_intents": [
{
"tool": "<string>",
"input": "<unknown>",
"mock_source": "<string>"
}
],
"degraded": true,
"failed_sources": [
{
"namespace": "<string>",
"count": 123
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}{
"code": "RUN_NOT_FOUND",
"message": "Run not found: 8f14e45f-ceea-4c6b-a1b2-3c4d5e6f7890"
}Get Run
Poll a Flow run for its status and result
curl --request GET \
--url https://api.godiligent.ai/flow-runs/{runId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.godiligent.ai/flow-runs/{runId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.godiligent.ai/flow-runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.godiligent.ai/flow-runs/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.godiligent.ai/flow-runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.godiligent.ai/flow-runs/{runId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/flow-runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "<string>",
"flow_id": "<string>",
"flow_version_id": "<string>",
"status": "QUEUED",
"triggered_at": "2023-11-07T05:31:56Z",
"trigger_type": "manual",
"triggered_by": "<string>",
"input": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"skip_reason": "<string>",
"report": "<string>",
"output_ref": "<string>",
"log_ref": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"step": "<string>",
"transient": true
},
"meta": {},
"records": [
{}
],
"run_mode": "rehearsal",
"act_intents": [
{
"tool": "<string>",
"input": "<unknown>",
"mock_source": "<string>"
}
],
"degraded": true,
"failed_sources": [
{
"namespace": "<string>",
"count": 123
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}{
"code": "RUN_NOT_FOUND",
"message": "Run not found: 8f14e45f-ceea-4c6b-a1b2-3c4d5e6f7890"
}Behavior
- Poll this endpoint with the
idreturned by Run untilstatusreaches a terminal value (COMPLETED,FAILED,CANCELLED, orSKIPPED), or register a webhook forflow_run_completedandflow_run_failed. The webhook includes the terminal run object; structured output is read separately with Get Run Output. reportis the full analyst-facing result as Markdown text when the Flow produces one. A completed structured-only Flow may omit it.output_refis set once structured output has been captured for the run. Its presence (not its value) is the signal that Get Run Output can be called to read the structured output.erroris only set whenstatusisFAILED.degradedistruewhen one or more tool calls failed even though the Flow finished.failed_sourcesgroups those failures by tool namespace and count.- Fields that are not available are omitted rather than returned as
null. - Returns
404ifrunIddoes not exist, or belongs to a different customer.
Authorizations
Path Parameters
The run's id, returned by POST /flows/{flowId}/runs
Response
OK
QUEUED: awaiting worker pickup. RUNNING: executing. COMPLETED/FAILED/CANCELLED/SKIPPED: terminal states.
QUEUED, RUNNING, COMPLETED, FAILED, CANCELLED, SKIPPED manual, api, external_event, schedule, evaluation User email for a manual run; service_account for API and automated runs.
The input the run was triggered with.
Set once the run moves from QUEUED to RUNNING.
Set once the run reaches a terminal state.
Why the trigger guard skipped the run. Set only when status is SKIPPED.
The analyst-facing Markdown report when the Flow produces one. A completed structured-only Flow may omit this field.
Present once structured output has been captured. Its presence means GET /flow-runs/{runId}/output can be called to read it.
Reference to the run's execution log when one was captured.
Set only when status is FAILED.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Present only for rehearsal runs.
rehearsal External actions the rehearsal would have performed.
Show child attributes
Show child attributes
True when one or more tool calls failed, even if the run completed.
Failed tool calls grouped by namespace.
Show child attributes
Show child attributes