自动化

列出动作引用方

列出引用该动作的编排。

列出引用该动作的编排。检查范围为脚本和工作流的草稿及最新版本。

GET /automation/v1/actions/{ns}/{name}/dependents

鉴权

Authorization: Bearer $PRAXIS_API_KEY

请求字段

参数类型说明
path: nsstring必填;命名空间,存储前转为小写,格式 [a-z0-9][a-z0-9._-]{0,63};praxis 只读。
path: namestring必填;名称,存储前转为小写,格式 [a-z0-9][a-z0-9._-]{0,63}。
query: limitinteger可选;每页条数,整数 1–100,默认 20。 minimum: 1;maximum: 100
query: cursorstring可选;上一页返回的 next_cursor,不透明字符串;保持原查询条件继续翻页。

示例

先设置以下环境变量,使用你自己的资源:

变量来源
ACTION_NAME创建动作返回的 name
: "${ACTION_NAME:?Set ACTION_NAME}"
curl --fail-with-body -X GET "https://api.deepraxis.ai/automation/v1/actions/docs-samples/${ACTION_NAME}/dependents" \
  -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.actions.dependents.list({
  "path": {
    "ns": "docs-samples",
    "name": env("ACTION_NAME")
  }
});
console.log(result);

响应

HTTP 200

Success

application/json

字段类型说明
dataobject[]必填 / 必有;本页的引用方(脚本与工作流,口径为最新版本加草稿),按 created_at 倒序、id 倒序排列。
data[].kind"script" / "workflow"必填 / 必有;编排类型。script 为 TypeScript 脚本,一次执行;workflow 为 YAML 工作流,由步骤组成,可等待事件、定时器或子运行并可暂停。
data[].namespacestring必填 / 必有;引用方的命名空间。
data[].namestring必填 / 必有;引用方的名字。
data[].atstring必填 / 必有;引用所在的草稿或最新版本号:draft 表示草稿,其余值为该编排最新发布的版本号。
next_cursornull / string必填 / 必有;下一页游标,原样传给 cursor 参数并保持原查询条件;没有更多页为 null。接口不返回总数。

实测响应

HTTP 200

{
  "data": [],
  "next_cursor": null
}

错误码

HTTP错误码与说明
400INVALID_PARAMS:请求参数、路径、游标或请求体格式无效。
404ACTION_NOT_FOUND:动作不存在或当前租户不可见;同名脚本/工作流存在时,hint 指向相应接口。
defaultRFC 9457 automation problem. 429 includes Retry-After.

鉴权错误与通用错误 · 排查时保留响应头 X-Request-Id。

导出

本页内容