Workflow Runs
Get Workflow Run Details
Retrieve detailed information for a specific workflow run including processing status and extraction results. Use this to check if processing is complete and get the extracted data.
POST
/
workflows
/
runs
/
getDetails
Get Workflow Run Details
curl --request POST \
--url https://api.emberqa.com/api/workflows/runs/getDetails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
'import requests
url = "https://api.emberqa.com/api/workflows/runs/getDetails"
payload = { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'f47ac10b-58cc-4372-a567-0e02b2c3d479'})
};
fetch('https://api.emberqa.com/api/workflows/runs/getDetails', 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.emberqa.com/api/workflows/runs/getDetails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.emberqa.com/api/workflows/runs/getDetails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emberqa.com/api/workflows/runs/getDetails"
payload := strings.NewReader("{\n \"id\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.emberqa.com/api/workflows/runs/getDetails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": "SUCCESS",
"statusMessage": "Successfully retrieved workflow run details",
"doc": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"filename": "Contract-12345-Review",
"status": "completed",
"created_time": "2024-01-15T10:30:00Z",
"metadata": {
"example_property": "example_value",
"example_property2": "example_value2"
},
"output_schema": {
"contract_number": {
"value": "CTR-789456",
"reasoning": "Found in the header section on page 1, labeled 'Contract #'"
},
"effective_date": {
"value": "2024-01-01",
"reasoning": "Located in the terms section, specified as 'Effective Date: January 1, 2024'"
},
"total_value": {
"value": "$50,000",
"reasoning": "Extracted from the payment schedule showing total contract value"
},
"payment_terms": {
"value": "Net 30",
"reasoning": "Found in payment terms section on page 2"
}
},
"supportingDocs": [
{
"id": "doc-123",
"filename": "contract-page-1.jpg",
"filenameUrl": "https://storage.example.com/..."
}
]
}
}Status Values
| Status | Description |
|---|---|
pending | Queued for processing |
processing | Currently being processed |
completed | Successfully completed - check output_schema for results |
failed | Processing failed - check failure_reason for details |
Result Data
When status iscompleted, the response includes:
output_schema- Extracted data where each field contains avalueandreasoningsupportingDocs- Array of processed files with presigned download URLs
Output Schema Format
Each field inoutput_schema returns an object with:
value- The extracted data (string or null if not found)reasoning- Explanation of how/why the value was extracted
Authorizations
API key obtained from the EmberQA dashboard under the "Integrations" tab
Body
application/json
Unique identifier of the workflow run (doc_id from submit response)
Example:
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
⌘I
Get Workflow Run Details
curl --request POST \
--url https://api.emberqa.com/api/workflows/runs/getDetails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
'import requests
url = "https://api.emberqa.com/api/workflows/runs/getDetails"
payload = { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'f47ac10b-58cc-4372-a567-0e02b2c3d479'})
};
fetch('https://api.emberqa.com/api/workflows/runs/getDetails', 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.emberqa.com/api/workflows/runs/getDetails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.emberqa.com/api/workflows/runs/getDetails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emberqa.com/api/workflows/runs/getDetails"
payload := strings.NewReader("{\n \"id\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.emberqa.com/api/workflows/runs/getDetails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": "SUCCESS",
"statusMessage": "Successfully retrieved workflow run details",
"doc": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"filename": "Contract-12345-Review",
"status": "completed",
"created_time": "2024-01-15T10:30:00Z",
"metadata": {
"example_property": "example_value",
"example_property2": "example_value2"
},
"output_schema": {
"contract_number": {
"value": "CTR-789456",
"reasoning": "Found in the header section on page 1, labeled 'Contract #'"
},
"effective_date": {
"value": "2024-01-01",
"reasoning": "Located in the terms section, specified as 'Effective Date: January 1, 2024'"
},
"total_value": {
"value": "$50,000",
"reasoning": "Extracted from the payment schedule showing total contract value"
},
"payment_terms": {
"value": "Net 30",
"reasoning": "Found in payment terms section on page 2"
}
},
"supportingDocs": [
{
"id": "doc-123",
"filename": "contract-page-1.jpg",
"filenameUrl": "https://storage.example.com/..."
}
]
}
}
