Get Run Output
curl --request GET \
--url https://api.godiligent.ai/flow-runs/{runId}/output \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.godiligent.ai/flow-runs/{runId}/output"
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}/output', 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}/output",
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}/output"
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}/output")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/flow-runs/{runId}/output")
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{
"status": "PARTIALLY_RESOLVED",
"alert_id": "2b7c1f4e-9d3a-4e8b-a6c5-1f0e9d8c7b6a",
"hits_processed": 2,
"per_hit": [
{
"hit_reference": "HIT-0001",
"verdict": "FALSE_POSITIVE",
"reason": "full-resolution",
"basis": "Rule \"Strong conflict: Strong name conflict\" determined FALSE_POSITIVE.",
"rule_resolution": {
"action": "COMMENT_FALSE_POSITIVE",
"applied_rule": {
"name": "Strong conflict: Strong name conflict",
"action": "COMMENT_FALSE_POSITIVE"
},
"matching_rules": [
{
"name": "Strong conflict: Strong name conflict",
"action": "COMMENT_FALSE_POSITIVE"
}
],
"primary_name_evidence": {
"types": [
"NAME_GIVEN_NAME_CONFLICT",
"NAME_MAIN"
],
"profile_fact_id": "f1a2b3c4-0000-4000-8000-000000000001",
"hit_fact_id": "f1a2b3c4-0000-4000-8000-000000000002",
"description": "\"Jane Doe\" vs. \"John Doe\". Given names are different. Family name identical.",
"similarity_score": 0.62,
"candidate_name": "John Doe"
},
"other_name_evidences": [],
"other_evidences": [],
"matching_segments": []
},
"hit_facts": [
{
"id": "f1a2b3c4-0000-4000-8000-000000000002",
"source_id": "HIT",
"snippet": "Name: John Doe",
"predicate": "has_name",
"value": "John Doe"
}
],
"hit_sources": [
{
"id": "f1a2b3c4-0000-4000-8000-000000000003",
"type": "ARTICLE",
"url": "https://example.org/sanctions-list"
}
],
"comment": "False positive. 1) name - \"Jane Doe\" vs. \"John Doe\". Given names are different."
},
{
"hit_reference": "HIT-0002",
"verdict": "UNRESOLVED",
"reason": "left-for-analyst",
"basis": "No rule matched — evidence insufficient to settle; requires analyst review.",
"comment": "Potential match. No significant mismatch is present."
}
],
"needs_human_review": 1,
"synced": true
}Flows
Get Run Output
Read a Flow run structured output as JSON
GET
/
flow-runs
/
{runId}
/
output
Get Run Output
curl --request GET \
--url https://api.godiligent.ai/flow-runs/{runId}/output \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.godiligent.ai/flow-runs/{runId}/output"
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}/output', 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}/output",
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}/output"
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}/output")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.godiligent.ai/flow-runs/{runId}/output")
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{
"status": "PARTIALLY_RESOLVED",
"alert_id": "2b7c1f4e-9d3a-4e8b-a6c5-1f0e9d8c7b6a",
"hits_processed": 2,
"per_hit": [
{
"hit_reference": "HIT-0001",
"verdict": "FALSE_POSITIVE",
"reason": "full-resolution",
"basis": "Rule \"Strong conflict: Strong name conflict\" determined FALSE_POSITIVE.",
"rule_resolution": {
"action": "COMMENT_FALSE_POSITIVE",
"applied_rule": {
"name": "Strong conflict: Strong name conflict",
"action": "COMMENT_FALSE_POSITIVE"
},
"matching_rules": [
{
"name": "Strong conflict: Strong name conflict",
"action": "COMMENT_FALSE_POSITIVE"
}
],
"primary_name_evidence": {
"types": [
"NAME_GIVEN_NAME_CONFLICT",
"NAME_MAIN"
],
"profile_fact_id": "f1a2b3c4-0000-4000-8000-000000000001",
"hit_fact_id": "f1a2b3c4-0000-4000-8000-000000000002",
"description": "\"Jane Doe\" vs. \"John Doe\". Given names are different. Family name identical.",
"similarity_score": 0.62,
"candidate_name": "John Doe"
},
"other_name_evidences": [],
"other_evidences": [],
"matching_segments": []
},
"hit_facts": [
{
"id": "f1a2b3c4-0000-4000-8000-000000000002",
"source_id": "HIT",
"snippet": "Name: John Doe",
"predicate": "has_name",
"value": "John Doe"
}
],
"hit_sources": [
{
"id": "f1a2b3c4-0000-4000-8000-000000000003",
"type": "ARTICLE",
"url": "https://example.org/sanctions-list"
}
],
"comment": "False positive. 1) name - \"Jane Doe\" vs. \"John Doe\". Given names are different."
},
{
"hit_reference": "HIT-0002",
"verdict": "UNRESOLVED",
"reason": "left-for-analyst",
"basis": "No rule matched — evidence insufficient to settle; requires analyst review.",
"comment": "Potential match. No significant mismatch is present."
}
],
"needs_human_review": 1,
"synced": true
}Behavior
- Returns the run’s structured output as the JSON response body. There is no separate download step.
- Every object key in the output is
snake_case, the same convention as the rest of the API. Values (names, comments, ids, URLs) are returned exactly as the Flow produced them. - The fields depend on the Flow. A Name Screening remediation Flow, for example, returns
status,alert_id,hits_processed,per_hit(one entry per hit withverdict,reason,basis,rule_resolution,hit_facts,hit_sourcesandcomment),needs_human_reviewandsynced. - Only call this once Get Run shows
output_refset on the run. - Returns
404with codeRUN_NOT_FOUNDifrunIddoes not exist, or belongs to a different customer. - Returns
404with codeOUTPUT_NOT_AVAILABLEif the run has not captured structured output — for example if it has not completed yet, or if the Flow doesn’t produce structured output. - Returns
413with codeOUTPUT_TOO_LARGEif the output is too large to return in one response. Contact your Diligent representative if you see this.
⌘I