Orchestrator
2021.10
False
  • 入门指南
    • 读取我
    • 关于 OData 和引用
    • Orchestrator URL
    • API 参考
    • 逻辑资源和元数据
    • 可用操作
    • 枚举类型
    • 正在验证身份
    • 构建 API 请求
    • 对外部 Apps 使用 OAuth
    • 每个端点的权限
    • 响应代码
    • 运行状况检查端点
  • Swagger 定义
  • Orchestrator API 使用示例
  • 平台管理 API
横幅背景图像
Orchestrator API 指南
上次更新日期 2024年4月19日

正在验证身份

通过持有者令牌进行本地用户身份验证(ROPC 身份验证)

重要提示: 我们支持通过 ROPC 进行身份验证,以便为已从独立部署迁移到 Automation Suite 部署的 Orchestrator 实例提供向后兼容性。只有 主机管理员 才能使用 /api/account/authenticate/ 端点进行身份验证。企业用户 应使用 外部应用程序进行身份验证。
资源所有者密码凭据身份验证方法是租户作用域,因此外部应用程序将无法使用此方法进行身份验证,因为无法在租户级别创建外部应用程序。
  1. 要检索访问令牌,请使用以下负载向 {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 帐户的密码
  2. 要查找 Orchestrator 实例的 TenancyName 值,请向 /odata/Users/UiPath.Server.Configuration.OData.GetCurrentUser 端点发出 GET 请求。
    响应正文返回持有者令牌,您的应用程序使用该令牌来授权进一步的 API 调用。 因此,在 API 调用的“授权”标头中,附加 Bearer xxxx 并将 xxxx 替换为 {access_token} 值(例如 Authorization: Bearer eyJhbG ... LnVxjA)。
    {
        "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
    }
    默认情况下,访问令牌的有效期为 30 分钟。 要生成新端点,请再次调用 api/account/authenticate 端点。
    重要提示:如果您的组织使用 Azure Active Directory 模型,则必须在 Orchestrator 中注册外部应用程序并使用 OAuth 流程。

大摇大摆

如果您使用 Swagger 试用我们的 API,只需在单独的选项卡中登录 Orchestrator 实例即可。

可以通过将 /swagger/ui/index#/ 后缀添加到 Orchestrator URL 来访问 Orchestrator API Swagger 定义。 例如 https://myOrchestrator.com/swagger/ui/index#/
注意: 根据在 Orchestrator 实例中设置的参数,Swagger 身份验证是否过期。 默认情况下,该时间设置为 30 分钟。 您可以通过修改 Web.config 文件中 Auth.Cookie.Expire 参数的值来更改此参数。

域用户身份验证

重要提示:

弃用时间线中所示,已删除通过 Windows 自动登录(NTLM 身份验证)访问 API。

我们建议您改用 OAuth 流程,这需要在 Orchestrator 中注册外部应用程序。

如果外部应用程序已注册,请参阅 对外部应用程序使用 OAuth

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.