uipath-automationhub
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUiPath Automation Hub — Open API Assistant
UiPath Automation Hub — Open API 助手
Work with business processes in UiPath Automation Hub (AH) through the AH Open API, authenticating with the user's cloud access token — the user does not need an admin-generated OpenAPI token. This one skill covers both writing a process to AH and reading one back; pick the flow below.
通过AH Open API操作UiPath Automation Hub(AH)中的业务流程,使用用户的云访问令牌进行身份验证——用户无需管理员生成的OpenAPI令牌。该技能涵盖向AH写入流程和读取流程两种操作,请选择下方对应的流程。
Step 0: Read the API reference
步骤0:阅读API参考文档
Always read first. It is the shared source of truth for the cloud-token auth model, the base/gateway URL, the exact headers (and which header to never send), and every endpoint the flows use.
references/api-endpoints.md请务必先阅读。它是云令牌认证模型、基础/网关URL、精确请求头(以及绝不能发送的请求头)和所有流程使用的端点的共享可信来源。
references/api-endpoints.mdAuthentication (shared — both flows)
身份验证(共享——适用于两种流程)
Resolve the cloud token + base URL + org + tenant in this priority order:
- Runtime env-auth (preferred — how UiPath Delegate provides it). If is set (with
UIPATH_CLI_AUTH_TOKEN), use it as the bearer and take org/tenant fromUIPATH_CLI_ENABLE_ENV_AUTH=true/UIPATH_CLI_ORGANIZATION_NAME(and theUIPATH_CLI_TENANT_NAMEvariants). Base URL defaults to..._ID. (If a parenthttps://cloud.uipath.comprocess instead exporteduip+UIPATH_ACCESS_TOKEN— theUIPATH_URLshape — use those.){base}/{org}/{tenant} - Logged-in session. Otherwise, if the user has run
uip, readuip login(JSON:~/.uipath/.auth,accessToken,baseUrl,organizationName).tenantName - User-provided (last resort). Ask the user to paste a cloud bearer token plus their org and tenant slugs (the two path segments after the host in their AH URL).
Use whatever you resolved as , , , in the flows.
$ACCESS_TOKEN$BASE_URL$ORG$TENANTGateway URL (every request):
{baseUrl}/{org}/{tenant}/automationhub_/api/v1/openapiThe platform injects tenant-routing headers from the segments — always use this gateway URL.
{org}/{tenant}Header rules (do not regress these):
- Send on every request (and
Authorization: Bearer <cloud access token>on POSTs).Content-Type: application/json - NEVER send or
x-ah-openapi-auth. Those route to the admin-token path and reject a cloud token with 401 — never add them to "fix" a 401.x-ah-openapi-app-key - Never fall back to an admin OpenAPI token. If no token resolves, stop and explain the skill needs the user's cloud session () or a host-provided token.
uip login - Cloud tokens are short-lived. On a 401, if the token came from , tell the user to run
~/.uipath/.authagain, re-resolve, and retry.uip login
按以下优先级顺序解析云令牌 + 基础URL + 组织 + 租户:
- 运行时环境认证(首选——UiPath Delegate的提供方式)。如果已设置(且
UIPATH_CLI_AUTH_TOKEN),将其用作承载令牌,并从UIPATH_CLI_ENABLE_ENV_AUTH=true/UIPATH_CLI_ORGANIZATION_NAME(及其UIPATH_CLI_TENANT_NAME变体)中获取组织/租户信息。基础URL默认值为..._ID。(如果父级https://cloud.uipath.com流程导出的是uip+UIPATH_ACCESS_TOKEN——格式为UIPATH_URL——则使用这些值。){base}/{org}/{tenant} - 已登录的会话。否则,如果用户已执行
uip,读取uip login(JSON格式:~/.uipath/.auth、accessToken、baseUrl、organizationName)。tenantName - 用户提供(最后手段)。请用户粘贴云承载令牌及其组织和租户标识(AH URL中主机名后的两个路径段)。
将解析得到的值作为流程中的、、、使用。
$ACCESS_TOKEN$BASE_URL$ORG$TENANT网关URL(所有请求均使用):
{baseUrl}/{org}/{tenant}/automationhub_/api/v1/openapi平台会从段注入租户路由请求头——请始终使用该网关URL。
{org}/{tenant}请求头规则(请勿违反):
- 所有请求均发送(POST请求还需发送
Authorization: Bearer <cloud access token>)。Content-Type: application/json - 绝不发送或
x-ah-openapi-auth。这些请求头会路由到管理员令牌路径,并以401状态码拒绝云令牌——切勿添加它们来“修复”401错误。x-ah-openapi-app-key - 绝不回退到管理员OpenAPI令牌。如果无法解析令牌,请停止操作并说明该技能需要用户的云会话()或宿主提供的令牌。
uip login - 云令牌有效期较短。如果收到401状态码,且令牌来自,请告知用户重新执行
~/.uipath/.auth,重新解析令牌后重试。uip login
Routing — pick the flow by intent
路由——根据意图选择流程
Classify what the user wants, then follow the matching reference. All flows share the Authentication section above and the endpoint catalog in .
references/api-endpoints.md| The user wants to... | Follow |
|---|---|
| Publish / create / upload a process (+ its PDD/SDD documents) to AH | |
| Get / read / fetch / list a process (+ its documents) from AH | |
| Shared auth + endpoint catalog (base URL, headers, every endpoint, error codes) | |
| (future AH Open API operation — add a row here) <!-- uip-check-skip --> | add |
To add a new capability (e.g. a future AH CLI surface or another Open API operation), keep this skill's product shape: add one , add a row above, and reuse this shared Authentication section — do not create a new per-operation skill.
uipreferences/<operation>.md分类用户的需求,然后遵循对应的参考文档。所有流程均共享上述身份验证部分和中的端点目录。
references/api-endpoints.md| 用户需求 | 遵循文档 |
|---|---|
| 发布/创建/上传流程(及其PDD/SDD文档)到AH | |
| 获取/读取/提取/列出AH中的流程(及其文档) | |
| 共享身份验证+端点目录(基础URL、请求头、所有端点、错误码) | |
| (未来AH Open API操作——在此处添加一行) <!-- uip-check-skip --> | 添加 |
如需添加新功能(例如未来的AH CLI界面或其他Open API操作),请保持本技能的产品架构:添加一个,在上方添加一行,并复用此共享身份验证部分——请勿创建新的针对单个操作的技能。
uipreferences/<operation>.mdNotes
注意事项
- Cloud token only — authorization is the user's real AH permissions; you see and can do exactly what their AH role allows.
- The publish flow fetches the idea-flow schema live, so it adapts automatically if fields change on the tenant.
- Open dependency: in a hosted runtime (e.g. Process Scribe/Delegate) the cloud token is expected via the environment (Authentication, option 1). Confirm the runtime provides (or an equivalent) before relying on it in production.
UIPATH_CLI_AUTH_TOKEN
- 仅支持云令牌——授权基于用户实际的AH权限;您能查看和执行的操作完全受限于用户的AH角色。
- 发布流程会实时获取创意流程schema,因此如果租户上的字段发生变化,它会自动适配。
- 开放依赖:在托管运行时(例如Process Scribe/Delegate)中,云令牌需通过环境变量提供(身份验证方式1)。在生产环境中依赖此方式前,请确认运行时已提供(或等效变量)。
UIPATH_CLI_AUTH_TOKEN