UiPath Documentation
orchestrator
2020.10
false
Orchestrator API 指南
  • 入门指南
    • 关于 OData 和引用
    • 构建 API 请求
    • 枚举类型
    • 正在验证身份
    • 构建 API 请求
    • 每个端点的权限
    • 响应代码
    • 运行状况检查端点
  • Swagger 定义
  • Orchestrator API
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

正在验证身份

UiPath Orchestrator API 的身份验证系统对本地用户使用持有者令牌,对目录用户使用 NTLM 身份验证。

备注:

By default, the bearer token expires after 30 minutes.

重要提示:

此页面上的说明仅适用于内部部署 Orchestrator API。 Automation Cloud Orchestrator 租户不支持 API 的基本身份验证。

If you are using the Orchestrator service in Automation Cloud, use the instructions in Consuming Cloud API instead.

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

  1. Make a POST request to the {OrchestratorURL}/api/account/authenticate endpoint with your Orchestrator login credentials, as in the example below.

    POST {OrchestratorURL}/api/account/authenticate

    Request headers:

    密钥
    授权承载

    Request body:

    {
        "tenancyName" : "Documentation",
        "usernameOrEmailAddress" : "Documentation",
        "password" : "DocumentationAPItest"
    }
    {
        "tenancyName" : "Documentation",
        "usernameOrEmailAddress" : "Documentation",
        "password" : "DocumentationAPItest"
    }
    

    Response code: 200 OK

    Response body:

    {
        "result": "<BEARER_TOKEN>",
        "targetUrl": null,
        "success": true,
        "error": null,
        "unAuthorizedRequest": false,
        "__abp": true
    }
    {
        "result": "<BEARER_TOKEN>",
        "targetUrl": null,
        "success": true,
        "error": null,
        "unAuthorizedRequest": false,
        "__abp": true
    }
    
  2. 将 HTTP 响应的结果参数中的字符串复制到剪贴板。 这表示不记名令牌,可在以后的所有请求中使用,如下所示:

    • As an Authorization header with the Bearer xxxxxxxxxxxxx value, where xxxxxxxxxxxxx represents the string previously copied;
    • 如果您的 API 测试工具支持,请选择持有者令牌授权类型,并输入先前复制的字符串。

通过 NTLM 身份验证的域用户身份验证

重要提示:

To authenticate your requests using Windows credentials you need to use an API client that supports NTLM authentication, such as Postman.

  1. Make a request to the desired endpoint specifying your Windows credentials in the dedicated API client. To change an NTLM auth header in Postman, navigate to the Auth tab, set the Type to NTLM Authentication, and fill in the Username and Password fields.

  2. 如果您的用户存在于多个租户中,请使用 X-UIPATH-TenantName 标头指定确切的租户,否则将在已配置用户的第一个租户中执行请求。 以下示例说明了对 Finance 租户中 {OrchestratorURL}/odata/Processes 端点的 GET 请求。

    获取{OrchestratorURL}/odata/Processes

    Request headers:

    密钥
    授权承载
    X-UIPATH-TenantName租户的名称。

    例如,“财务”。

    Response code: 200 OK

    Response body:

    {
        "@odata.context": "{OrchestratorURL}/odata/$metadata#Processes",
        "@odata.count": 2,
        "value": [
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": true,
                "Title": null,
                "Version": "1.0.6981.35861",
                "Key": "QueueItemsProcessing:1.0.6981.35861",
                "Description": "Process items from an Orchestrator queue.",
                "Published": "2020-10-17T14:22:11.0566667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": null,
                "Authors": "petrina.smith",
                "ProjectType": "Undefined",
                "Id": "QueueItemsProcessing",
                "Arguments": {
                    "Input": "[{\"name\":\"argument1\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true},{\"name\":\"argument2\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"argument3\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true}]",
                    "Output": null
                }
            },
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": false,
                "Title": "TestingSequence",
                "Version": "4.0.6",
                "Key": "TestingSequence:4.0.6",
                "Description": "Blank Process",
                "Published": "2020-10-17T13:04:06.6766667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": "Invoke WF Action Generator",
                "Authors": "petrina.smith",
                "ProjectType": "Process",
                "Id": "TestingSequence",
                "Arguments": {
                    "Input": "[{\"name\":\"Name\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Email\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Product\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false}]",
                    "Output": null
                }
            }
        ]
    }
    {
        "@odata.context": "{OrchestratorURL}/odata/$metadata#Processes",
        "@odata.count": 2,
        "value": [
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": true,
                "Title": null,
                "Version": "1.0.6981.35861",
                "Key": "QueueItemsProcessing:1.0.6981.35861",
                "Description": "Process items from an Orchestrator queue.",
                "Published": "2020-10-17T14:22:11.0566667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": null,
                "Authors": "petrina.smith",
                "ProjectType": "Undefined",
                "Id": "QueueItemsProcessing",
                "Arguments": {
                    "Input": "[{\"name\":\"argument1\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true},{\"name\":\"argument2\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"argument3\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true}]",
                    "Output": null
                }
            },
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": false,
                "Title": "TestingSequence",
                "Version": "4.0.6",
                "Key": "TestingSequence:4.0.6",
                "Description": "Blank Process",
                "Published": "2020-10-17T13:04:06.6766667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": "Invoke WF Action Generator",
                "Authors": "petrina.smith",
                "ProjectType": "Process",
                "Id": "TestingSequence",
                "Arguments": {
                    "Input": "[{\"name\":\"Name\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Email\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Product\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false}]",
                    "Output": null
                }
            }
        ]
    }
    

Accessing Swagger

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

The Orchestrator API Swagger definition can be accessed by adding the /swagger/ui/index#/ suffix to your Orchestrator URL. For example, {baseURL2} /swagger/ui/index#/.

备注:

The Swagger authentication expires according to the parameters set in your Orchestrator instance. By default, it is set to 30 minutes. You can change it by modifying the value of the Auth.Cookie.Expire parameter, in the Web.config file.

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新