Read a risk run
curl --request GET \
--url https://api.itoflow.ai/risk/runs/{run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/risk/runs/{run_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/risk/runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "running",
"progress": {
"at_most_seconds": 4503599627370495,
"expected_seconds": 4503599627370495,
"names_asked": 4503599627370495,
"stage": "waiting_for_coverage",
"waited_seconds": 4503599627370495
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}Risk runs
Read a risk run
Read the run until it ends. A running run may carry progress: waiting_for_coverage while the factor model scores names_asked names (waited_seconds so far, expected_seconds the likely total, at_most_seconds the longest wait before the run measures what it has), then measuring. Finished results stay for 24 hours. A result with figures includes summary, view, component and the verified analytics reference. A failed run returns 200 with failure_code and reason: engine_refused means change the request; rate_limited and provider_unavailable mean the price provider failed, so start again later with a new request_key; timed_out and cancelled also end a run. Requires itoflow-engine-results.
Operation ID: getRiskRun.
GET
https://api.itoflow.ai
/
risk
/
runs
/
{run_id}
Read a risk run
curl --request GET \
--url https://api.itoflow.ai/risk/runs/{run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/risk/runs/{run_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/risk/runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "running",
"progress": {
"at_most_seconds": 4503599627370495,
"expected_seconds": 4503599627370495,
"names_asked": 4503599627370495,
"stage": "waiting_for_coverage",
"waited_seconds": 4503599627370495
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}