Get Responses
Get Run Output
Retrieve the output of a completed workflow run
GET
/
api
/
v1
/
workflows
/
{workflowId}
/
runs
/
{runId}
/
async
/
response
curl https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response \
-H "x-origami-key: your-api-key"
const response = await fetch(
'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response',
{
headers: { 'x-origami-key': 'your-api-key' },
}
);
const { data } = await response.json();
// Access outputs by row ID
for (const [rowId, output] of Object.entries(data)) {
console.log(`Row ${rowId}:`, output);
}
import requests
response = requests.get(
"https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response",
headers={"x-origami-key": "your-api-key"},
)
data = response.json()["data"]
# Access outputs by row ID
for row_id, output in data.items():
print(f"Row {row_id}: {output}")
{
"success": true,
"data": {
"bcf88898-fc5f-410b-b749-0c65b2902d3e": {
"summary": "AI-generated summary of the input document...",
"sentiment": "positive",
"confidence": 0.95
}
}
}
{
"success": false,
"error": "Workflow run is not completed. Current status: running"
}
{
"success": false,
"error": "Workflow run is not completed. Current status: failed. Error: Node 'api_call' failed: Connection timeout"
}
{
"success": false,
"error": "Workflow run not found"
}
Get Run Output
Returns the output data from a completed workflow run. Only call this after the run status iscompleted.
Path Parameters
string
required
The unique identifier of the workflow
string
required
The unique identifier of the run
Response
boolean
Whether the request was successful
object
A map of row IDs to their output objects. Each row’s output contains the field mappings you configured in your Output node(s).
Example Outputs
Single Row
{
"success": true,
"data": {
"bcf88898-fc5f-410b-b749-0c65b2902d3e": {
"summary": "This is the generated summary text..."
}
}
}
Multiple Fields
{
"success": true,
"data": {
"bcf88898-fc5f-410b-b749-0c65b2902d3e": {
"title": "Generated Title",
"description": "Generated description text...",
"tags": ["tag1", "tag2", "tag3"]
}
}
}
Multiple Rows
{
"success": true,
"data": {
"row-id-1": {
"result": "Output for first input"
},
"row-id-2": {
"result": "Output for second input"
},
"row-id-3": {
"result": "Output for third input"
}
}
}
curl https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response \
-H "x-origami-key: your-api-key"
const response = await fetch(
'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response',
{
headers: { 'x-origami-key': 'your-api-key' },
}
);
const { data } = await response.json();
// Access outputs by row ID
for (const [rowId, output] of Object.entries(data)) {
console.log(`Row ${rowId}:`, output);
}
import requests
response = requests.get(
"https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response",
headers={"x-origami-key": "your-api-key"},
)
data = response.json()["data"]
# Access outputs by row ID
for row_id, output in data.items():
print(f"Row {row_id}: {output}")
{
"success": true,
"data": {
"bcf88898-fc5f-410b-b749-0c65b2902d3e": {
"summary": "AI-generated summary of the input document...",
"sentiment": "positive",
"confidence": 0.95
}
}
}
{
"success": false,
"error": "Workflow run is not completed. Current status: running"
}
{
"success": false,
"error": "Workflow run is not completed. Current status: failed. Error: Node 'api_call' failed: Connection timeout"
}
{
"success": false,
"error": "Workflow run not found"
}
⌘I
curl https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response \
-H "x-origami-key: your-api-key"
const response = await fetch(
'https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response',
{
headers: { 'x-origami-key': 'your-api-key' },
}
);
const { data } = await response.json();
// Access outputs by row ID
for (const [rowId, output] of Object.entries(data)) {
console.log(`Row ${rowId}:`, output);
}
import requests
response = requests.get(
"https://api.origamiagents.com/api/v1/workflows/wf_abc123/runs/run_xyz789/async/response",
headers={"x-origami-key": "your-api-key"},
)
data = response.json()["data"]
# Access outputs by row ID
for row_id, output in data.items():
print(f"Row {row_id}: {output}")
{
"success": true,
"data": {
"bcf88898-fc5f-410b-b749-0c65b2902d3e": {
"summary": "AI-generated summary of the input document...",
"sentiment": "positive",
"confidence": 0.95
}
}
}
{
"success": false,
"error": "Workflow run is not completed. Current status: running"
}
{
"success": false,
"error": "Workflow run is not completed. Current status: failed. Error: Node 'api_call' failed: Connection timeout"
}
{
"success": false,
"error": "Workflow run not found"
}