orchestrator
2020.10
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。

不在支持范围内
Orchestrator API 指南
上次更新日期 2024年6月18日
正在验证身份
linkUiPath Orchestrator API 的身份验证系统对本地用户使用持有者令牌,对目录用户使用 NTLM 身份验证。
注意: 默认情况下,持有者令牌将在 30 分钟后过期。
重要提示:
此页面上的说明仅适用于内部部署 Orchestrator API。 Automation Cloud Orchestrator 租户不支持 API 的基本身份验证。
如果您在 Automation Cloud 中使用 Orchestrator 服务,请改用使用 Cloud API 中的说明。
通过持有者令牌进行本地用户身份验证
link- 使用 Orchestrator 登录凭据向
{OrchestratorURL}/api/account/authenticate
端点发出 POST 请求,如下例所示。POST{OrchestratorURL}/api/account/authenticate
Request headers:
密钥
值
授权
承载
Request body:
{ "tenancyName" : "Documentation", "usernameOrEmailAddress" : "Documentation", "password" : "DocumentationAPItest" }
{ "tenancyName" : "Documentation", "usernameOrEmailAddress" : "Documentation", "password" : "DocumentationAPItest" }响应代码: 200 确定
Response body:
{ "result": "Rr22VaC0D6MkzFShb0gKqaw3vYUJSMmo4jJWk5crDYtSbZkxPFuOC9ApMEnug2q8WxEGPkVwmNoaSXzxOBwia1Ecrldg5BUXXErU_VNOo_yt7X_GDF8sMTyErSqO9Gfe7RSinIueQU6Q_axlY4jDnCP5r2LHrAJVdyM8Tg9x3WHnR8MOgeOl290uTsSOM1ezGG-OmFarRqFUPiN2-iE_mo1KNW-9AmT87-p1-ZYTusLaGyTS9jKVGtRhMjjB0l9VyOFvINhjptq8zotCo5cOOVWJeuvh-307ZdcUWHxkFTwoGDS_DpC4D7JrKfp4oWeSkA0SSy95RfzT8KRTmsJGQV0k8VD6HE3aa_7c-FGrCDjRVtDSkTgpQcQFrIXD8kT4P52a_18doKaSB-asQ8scYe_o73fCL4VtqLDb2ZWlAwEChVmorcFjbXnejxuAubjoKaoJH10gzc5_IiCPI8pM-Zm09Z5D1ljsNjWJ_LrmOR3dijuuKUGvCDtyCCCU_JrPRxmdYSXZmHHx_3joAux0-A", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }
{ "result": "Rr22VaC0D6MkzFShb0gKqaw3vYUJSMmo4jJWk5crDYtSbZkxPFuOC9ApMEnug2q8WxEGPkVwmNoaSXzxOBwia1Ecrldg5BUXXErU_VNOo_yt7X_GDF8sMTyErSqO9Gfe7RSinIueQU6Q_axlY4jDnCP5r2LHrAJVdyM8Tg9x3WHnR8MOgeOl290uTsSOM1ezGG-OmFarRqFUPiN2-iE_mo1KNW-9AmT87-p1-ZYTusLaGyTS9jKVGtRhMjjB0l9VyOFvINhjptq8zotCo5cOOVWJeuvh-307ZdcUWHxkFTwoGDS_DpC4D7JrKfp4oWeSkA0SSy95RfzT8KRTmsJGQV0k8VD6HE3aa_7c-FGrCDjRVtDSkTgpQcQFrIXD8kT4P52a_18doKaSB-asQ8scYe_o73fCL4VtqLDb2ZWlAwEChVmorcFjbXnejxuAubjoKaoJH10gzc5_IiCPI8pM-Zm09Z5D1ljsNjWJ_LrmOR3dijuuKUGvCDtyCCCU_JrPRxmdYSXZmHHx_3joAux0-A", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true } - 将 HTTP 响应的结果参数中的字符串复制到剪贴板。 这表示不记名令牌,可在以后的所有请求中使用,如下所示:
- 作为具有
Bearer xxxxxxxxxxxxx
值的 授权 标头,其中xxxxxxxxxxxxx
表示先前复制的字符串; - 如果您的 API 测试工具支持,请选择持有者令牌授权类型,并输入先前复制的字符串。
- 作为具有
通过 NTLM 身份验证的域用户身份验证
link重要提示: 要使用 Windows 凭据对请求进行身份验证,您需要使用支持 NTLM 身份验证的 API 客户端,例如 Postman。
- 向所需端点发出请求,在专用 API 客户端中指定您的 Windows 凭据。 要在 Postman 中更改 NTLM 身份验证标头,请导航到“身份 验证 ” 选项卡,将“ 类型 ” 设置为“ NTLM 身份验证”,然后填写“ 用户名 ” 和“ 密码 ” 字段。
- 如果您的用户存在于多个租户中,请使用
X-UIPATH-TenantName
标头指定确切的租户,否则将在已配置用户的第一个租户中执行请求。 以下示例说明了对 Finance 租户中{OrchestratorURL}/odata/Processes
端点的GET
请求。获取{OrchestratorURL}/odata/Processes
Request headers:
密钥
值
授权
承载
X-UIPATH-TenantName
租户的名称。
例如,“财务”。
响应代码: 200 确定
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 } } ] }
访问 Swagger
link如果您使用 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#/
.
注意: 根据在 Orchestrator 实例中设置的参数,Swagger 身份验证是否过期。 默认情况下,该时间设置为 30 分钟。 您可以通过修改
Web.config
文件中 Auth.Cookie.Expire
参数的值来更改此参数。