Base URL: https://api.flow.iai.one — Tất cả endpoints yêu cầu session cookie trừ /api/auth/login.
{items:[]}{
"id": "wf_abc123",
"name": "My Flow",
"status": "active", // draft | active | archived
"version": 1,
"workspace_id": "ws_xyz",
"definition_json": "{...}", // WorkflowDefinition JSON string
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
?limit=50&status=success{items:[]}{
"id": "run_abc123",
"workflow_id": "wf_abc123",
"workflow_name": "My Flow",
"status": "success", // running | success | failed | pending
"triggered_by": "manual", // manual | schedule | webhook
"duration_ms": 1240,
"started_at": "2026-01-01T00:00:00Z",
"finished_at": "2026-01-01T00:00:01Z",
"output": { ... },
"error_text": null
}
?run_id=&limit=?search=&category=?agent_id={ "ok": true, "ts": "2026-01-01T00:00:00Z" }
| Status | Meaning |
|---|---|
400 | Bad Request — missing or invalid fields |
401 | Unauthorized — no valid session cookie |
403 | Forbidden — workspace membership mismatch |
404 | Not Found |
500 | Internal Server Error |
{ "error": "Human-readable error message" }