自动化
列出运行产物
读取运行产物及其文件引用。
读取运行产物及其文件引用。按账本顺序返回类型、大小及所属步骤。
GET /automation/v1/runs/{id}/artifacts
鉴权
Authorization: Bearer $PRAXIS_API_KEY
请求字段
| 参数 | 类型 | 说明 |
|---|---|---|
| path: id | string | 必填;运行 ID(run_)。 |
| query: limit | integer | 可选;每页条数,整数 1–100,默认 50。 minimum: 1;maximum: 100 |
| query: cursor | string | 可选;上一页返回的 next_cursor,不透明字符串;保持原查询条件继续翻页。 |
示例
先设置以下环境变量,使用你自己的资源:
| 变量 | 来源 |
|---|---|
| RUN_ID | 运行 id;暂停和恢复仅工作流;取消需非终态运行 |
: "${RUN_ID:?Set RUN_ID}"
curl --fail-with-body -X GET "https://api.deepraxis.ai/automation/v1/runs/${RUN_ID}/artifacts" \
-H "Authorization: Bearer $PRAXIS_API_KEY"import { createAutomationClient } from '@deepractice-ai/praxis-sdk/automation';
function env(name: string): string {
const value = process.env[name];
if (!value) throw new Error(`Set ${name}`);
return value;
}
const automation = createAutomationClient({
apiKey: env('PRAXIS_API_KEY'),
baseUrl: 'https://api.deepraxis.ai',
maxRetries: 0,
timeoutMs: 90_000,
});
const result = await automation.runs.artifacts.list({
"path": {
"id": env("RUN_ID")
}
});
console.log(result);响应
HTTP 200
Success
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
| data | object[] | 必填 / 必有;本页的运行产物,按 created_at 倒序、id 倒序排列。 |
| data[].id | string | 必填 / 必有;产物 ID,按不透明字符串处理。 |
| data[].file_id | string | 必填 / 必有;产物在文件服务中的文件 ID,用文件接口下载内容。 |
| data[].name | string | 必填 / 必有;产物文件名。 |
| data[].content_type | string | 必填 / 必有;产物的 MIME 类型。 |
| data[].size_in_bytes | number | 必填 / 必有;产物大小,单位字节。 |
| data[].task | null / string | 必填 / 必有;产生该产物的工作流步骤的 JSON Pointer;不属于某个步骤为 null。 |
| data[].created_at | string | 必填 / 必有;产物创建时间(RFC 3339 UTC)。 |
| next_cursor | null / string | 必填 / 必有;下一页游标,原样传给 cursor 参数并保持原查询条件;没有更多页为 null。接口不返回总数。 |
实测响应
HTTP 200
{
"data": [],
"next_cursor": null
}错误码
| HTTP | 错误码与说明 |
|---|---|
| 400 | INVALID_PARAMS:请求参数、路径、游标或请求体格式无效。 |
| 404 | RUN_NOT_FOUND:运行不存在或当前租户不可见。 |
| default | RFC 9457 automation problem. 429 includes Retry-After. |
鉴权错误与通用错误 · 排查时保留响应头 X-Request-Id。