§ API REFERENCE
查询执行
GET
/executions/{id}scope: executions:read查询本 APP 自己的执行状态(越权返回 404)。
鉴权:Authorization: Bearer <access_token>。
§ 1
请求信息
REQUESTGET https://api.lingxiguangnian.com/api/open/v1/executions/{id}请求头
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string | 是 | Bearer <access_token>。由 POST /token 换取,有效期 2 小时;api_secret 不得直连业务端点(→ 401)。 |
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | uuid | 是 | 执行 ID。 |
§ 2
调用示例
EXAMPLESGET /executions/{id}
curl "https://api.lingxiguangnian.com/api/open/v1/executions/9b8e0c2a-3d4f-4a5b-8c6d-7e8f9a0b1c2d" \ -H "Authorization: Bearer oat_xxxxxxxxxxxxxxxx"
§ 3
返回结果
RESPONSE返回字段
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
execution_id | uuid | 是 | 执行 ID。 |
status | string | 是 | PENDING / RUNNING / COMPLETED / FAILED / CANCELLED / REJECTED。 |
kind | string | 是 | 执行类型。 |
resource_type | enum | null | 是 | CAPABILITY_UNIT / SCENE_SOLUTION。 |
resource_id | uuid | null | 是 | 被调用的产品资源。 |
credit_amount | number | 是 | 冻结/结算点数。 |
settlement_status | enum | 是 | NOT_HELD / HELD / SETTLED / RELEASED。 |
started_at | string | null | 是 | 开始时间。 |
finished_at | string | null | 是 | 结束时间。 |
last_error_code | string | null | 是 | 最近错误码。 |
RESPONSE · JSON
{ "success": true, "data": { "execution_id": "9b8e0c2a-3d4f-4a5b-8c6d-7e8f9a0b1c2d", "status": "RUNNING", "kind": "assessment", "started_at": "2026-06-04T03:00:00.000Z", "finished_at": null, "last_error_code": null } }§ 4
端点错误码
ERRORS通用鉴权、scope 与限流错误见「使用概述」;下表为本端点专属错误。
| HTTP | error_code | 触发条件 |
|---|---|---|
| 404 | open_api.execution_not_found | 执行不存在或不属本 APP(越权统一 404)。 |
契约真源:apps/m-master/src/app/api/open/v1/executions/[id]/route.ts