orchestrator
2021.10
false
- 入门指南
- 身份验证
- Swagger 定义
- Orchestrator API
- 平台管理 API
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。

不在支持范围内
Orchestrator API 指南
上次更新日期 2024年10月31日
正在验证身份
linkAPI 身份验证可确保只有授权方才能与可用资源进行交互并执行必要的操作。UiPath 为不同场景提供了多种身份验证方法。
通过持有者令牌进行本地用户身份验证(ROPC 身份验证)
link重要提示:我们支持通过 ROPC 进行身份验证,以便为已从独立部署迁移到 Automation Suite 部署的 Orchestrator 实例提供向后兼容性。只有主机管理员才能使用 /api/account/authenticate/ 端点进行身份验证。企业用户应使用外部应用程序进行身份验证。
资源所有者密码凭据身份验证方法是租户作用域,因此外部应用程序将无法使用此方法进行身份验证,因为无法在租户级别创建外部应用程序。
- 要检索访问令牌,请使用以下负载向
{OrchestratorURL}/api/account/authenticate
端点发出 POST 请求:{ "TenancyName": "{account_tenancy_name}", "UsernameOrEmailAddress": "{account_username}", "Password": "{account_password}" }
{ "TenancyName": "{account_tenancy_name}", "UsernameOrEmailAddress": "{account_username}", "Password": "{account_password}" }在上述请求中:
-
{account_tenancy_name}
- 是您的 Automation Suite 帐户中的租户唯一标识符 -
{account_username}
- 是您的 Automation Suite 帐户的用户名 -
{account_password}
- 是用于登录 Automation Suite 帐户的密码
-
- 要查找 Orchestrator 实例的
TenancyName
值,请向/odata/Users/UiPath.Server.Configuration.OData.GetCurrentUser
端点发出 GET 请求。响应正文返回持有者令牌,您的应用程序使用该令牌来授权进一步的 API 调用。 因此,在 API 调用的“授权”标头中,附加Bearer xxxx
并将xxxx
替换为{access_token}
值(例如Authorization: Bearer eyJhbG ... LnVxjA
)。默认情况下,访问令牌的有效期为 30 分钟。 要生成新端点,请再次调用{ "result": "{access_token}", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }
{ "result": "{access_token}", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }api/account/authenticate
端点。重要提示:如果您的组织使用 Azure Active Directory 模型,则必须在 Orchestrator 中注册外部应用程序并使用 OAuth 流程。
访问 Swagger
link如果您使用 Swagger 试用我们的 API,只需在单独的选项卡中登录 Orchestrator 实例即可。
可以通过将
/swagger/ui/index#/
后缀添加到 Orchestrator URL 来访问 Orchestrator API Swagger 定义。例如,https://{yourDomain}/swagger/ui/index#/
。
注意: 根据在 Orchestrator 实例中设置的参数,Swagger 身份验证是否过期。 默认情况下,该时间设置为 30 分钟。 您可以通过修改
Web.config
文件中 Auth.Cookie.Expire
参数的值来更改此参数。