Skip to main content

POST /public/workflows//execute

Start a flow execution with input data.
import requests

FLOW_ID = "your-flow-id"

response = requests.post(
    f"https://catalogapi.rastro.ai/api/public/workflows/{FLOW_ID}/execute",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "input": [
            {"sku": "A1", "title": "Product A"}
        ]
    }
)
print(response.json())

Request Parameters

ParameterTypeRequiredDescription
inputarrayYesArray of objects to process

Response

{
  "workflow_run_id": "run_abc123",
  "status": "running"
}
FieldTypeDescription
workflow_run_idstringRun ID for status polling
statusstring"running"

GET /public/workflows/runs/

Check the status of a flow run and retrieve results.
response = requests.get(
    f"https://catalogapi.rastro.ai/api/public/workflows/runs/{run_id}",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
print(response.json())

Response (running)

{
  "status": "running",
  "progress": 0.5
}

Response (completed)

{
  "status": "completed",
  "results": {
    "data": [
      {"sku": "A1", "title": "Product A", "enriched_field": "..."},
      {"sku": "A2", "title": "Product B", "enriched_field": "..."}
    ]
  }
}

Response Fields

FieldTypeDescription
statusstringCurrent status
progressnumberProgress from 0 to 1 (when running)
resultsobjectContains data array with enriched items (when completed)

Status Values

StatusDescription
runningFlow is processing
completedFlow finished successfully
failedFlow failed