葫芦流 · API
数据模型
各端点共享的请求头、响应体与错误格式。
鉴权
所有 `/api/v1/*` 请求需 Header:`Authorization: Bearer hulu_…`
Authorization: Bearer hulu_…
WorkflowOut
{
"id": 12,
"name": "Product pipeline",
"status": "paused",
"graph_json": { "nodes": [], "edges": [] },
"interval_minutes": 1440,
"next_run_at": null,
"last_run_at": null,
"last_error": null,
"created_at": "2026-01-01T00:00:00Z"
}
WorkflowRunOut
{
"id": 101,
"workflow_id": 12,
"status": "success",
"error": null,
"started_at": "2026-01-01T12:00:00Z",
"finished_at": "2026-01-01T12:01:30Z"
}
DatasetOut / DatasetRowsOut
{
"id": 3,
"name": "Products",
"row_count": 240,
"column_count": 4,
"columns": [{ "key": "title", "label": "title", "type": "text" }],
"page": 1,
"page_size": 50,
"total": 240,
"total_pages": 5,
"rows": [{ "id": 1, "key_hash": "…", "data": { "title": "Item" }, "created_at": "…", "updated_at": "…" }]
}
错误响应
FastAPI 标准 `detail` 字段;额度不足为 HTTP 402。
{ "detail": "Invalid API key" }
HTTP 401
{ "detail": "Credit quota exceeded" }
HTTP 402
{ "detail": "Workflow not found" }
HTTP 404
分页
列表接口使用 `page`、`page_size`、`total`、`total_pages`。