Get a Flow by ID

Retrieve detailed information about a specific flow by its ID.

Response includes:

  • Flow ID and associated template
  • Current execution state (created, starting, running, completed, aborted, failed)
  • Progress value (0.0 = processing, 1.0 = finished)
  • Timestamps: created_at, started_at, finished_at
  • Configured parameters
  • Additional custom metadata

Polling Pattern: Poll this endpoint regularly (e.g., every 5 seconds) to monitor flow execution. Check the state field to determine when processing is complete. Once state is 'completed', 'failed', or 'aborted', stop polling and retrieve outputs.

Example Usage:

while True:
    response = requests.get(f'{'{'}BASE_URL{'}'}/flows/{'{'}flow_id{'}'}', headers=headers)
    status = response.json()
    if status['state'] in ['completed', 'failed', 'aborted']:
        break
    time.sleep(5)

This endpoint allows you to get flow details.

Endpoint

GET https://flows.generio.ai/flows/{flow_id}

Parameters

flow_id (required)

  • Location: path
  • Type: string

Responses

200

Successful Response

422

Validation Error

Code Examples

Copy and run these examples in your terminal or code editor. Make sure to replace YOUR_TOKEN with your actual authentication token.

curl -X GET "https://flows.generio.ai/flows/{flow_id}" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
wget --header="Authorization: Bearer YOUR_TOKEN" \
  "https://flows.generio.ai/flows/{flow_id}" -O -
import requests

url = "https://flows.generio.ai/flows/{flow_id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
const url = "https://flows.generio.ai/flows/{flow_id}";
fetch(url, {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error("Error:", error));
<?php
$url = "https://flows.generio.ai/flows/{flow_id}";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer YOUR_TOKEN",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>