项目状态
列出状态
GET /external/v1/projects/{project_id}/statusesbash
curl http://localhost:8000/external/v1/projects/PROJECT_ID/statuses \
-H "Authorization: Bearer API_KEY"响应(200):
json
[
{
"name": "pipeline",
"fields": [
{ "name": "current_stage", "type": "string", "default": "idle" },
{ "name": "progress", "type": "integer", "default": 0 }
],
"values": { "current_stage": "embedding", "progress": 45 }
}
]更新状态字段值
PATCH /external/v1/projects/{project_id}/statuses/{status_name}/values只有传入的字段会被修改,其余字段保持不变。
请求体(JSON):
| 字段 | 类型 | 说明 |
|---|---|---|
values | object | 字段名 → 新值的映射(不能为空) |
字段必须是该状态已声明的字段,否则返回 400。
bash
curl -X PATCH \
http://localhost:8000/external/v1/projects/PROJECT_ID/statuses/pipeline/values \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{"values": {"current_stage": "done", "progress": 100}}'响应(200):
json
{ "status": "pipeline", "values": { "current_stage": "done", "progress": 100 } }