通过 Orchestrator API 检索和筛选作业记录。
请求由特定机器人启动的作业
您可以按机器人 ID、机器人名称、作业状态和日期筛选作业。以下部分显示了基本请求格式和常见筛选器示例。
基本请求格式
获取
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs?$top=3&$filter={filter-expression}
请求标头
| 密钥 | 值 |
|---|---|
| 授权 | 承载 |
响应代码
200 OK
筛选器示例
使用这些筛选器变体,按不同条件查询作业:
| 用例 | 筛选器表达式 |
|---|---|
| 按机器人 ID | Robot/Id eq 749 |
| 按机器人名称 | Robot/Name eq 'DocBot' |
| 按机器人 ID 和状态 | Robot/Id eq 749 and State eq 'Successful' |
| 按机器人 ID 和结束日期 | Robot/Id eq 759 and EndTime lt 2018-02-22T10:00:00.837Z |
| 按机器人 ID 和开始日期 | Robot/Id eq 749 and StartTime gt 2017-09-22T09:59:22.837Z |
响应示例
以下响应显示了查询作业时返回的结构:
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"@odata.count": 13,
"value": [
{
"Key": "1c7222dc-416f-4c60-9b17-88262c91768f",
"StartTime": "2018-01-15T18:18:02.79Z",
"EndTime": "2018-01-15T18:18:47.587Z",
"State": "Successful",
"Source": "Manual",
"BatchExecutionKey": "8c5302a7-8ed3-458a-ab64-34cc72fdd709",
"Info": "Job completed",
"CreationTime": "2018-01-15T18:18:01.623Z",
"StartingScheduleId": null,
"Id": 125161
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"@odata.count": 13,
"value": [
{
"Key": "1c7222dc-416f-4c60-9b17-88262c91768f",
"StartTime": "2018-01-15T18:18:02.79Z",
"EndTime": "2018-01-15T18:18:47.587Z",
"State": "Successful",
"Source": "Manual",
"BatchExecutionKey": "8c5302a7-8ed3-458a-ab64-34cc72fdd709",
"Info": "Job completed",
"CreationTime": "2018-01-15T18:18:01.623Z",
"StartingScheduleId": null,
"Id": 125161
}
]
}
开始作业
以下请求使您能够在关联环境中的所有可用机器人上开始执行指定的流程(通过 ReleaseKey 参数)。
“全部”策略不适用于新式文件夹。
发布
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
请求标头
| 密钥 | 值 |
|---|---|
| 授权 | 承载 |
请求正文
{
"startInfo": {
"ReleaseKey": "795cbab2-8008-4a54-b1cb-f9ff1ece139e",
"Strategy": "All",
"RobotIds": [],
"NoOfRobots": 0
}
}
{
"startInfo": {
"ReleaseKey": "795cbab2-8008-4a54-b1cb-f9ff1ece139e",
"Strategy": "All",
"RobotIds": [],
"NoOfRobots": 0
}
}
响应代码
200 OK
响应正文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"value": [
{
"Key": "31ade17f-5a35-4250-beea-43922dc2a20d",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"BatchExecutionKey": "cbaff1c6-32b0-468b-9ad9-b59f9ca1d3b6",
"Info": null,
"CreationTime": "2018-03-19T19:01:58.6806126Z",
"StartingScheduleId": null,
"Id": 128209
},
{
"Key": "c4caf051-9db6-486d-8078-231f9dec1a4c",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"BatchExecutionKey": "cbaff1c6-32b0-468b-9ad9-b59f9ca1d3b6",
"Info": null,
"CreationTime": "2018-03-19T19:01:58.7610094Z",
"StartingScheduleId": null,
"Id": 128210
},
{
"Key": "969552ba-cfe5-4e87-adde-c85a358ae96f",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"BatchExecutionKey": "cbaff1c6-32b0-468b-9ad9-b59f9ca1d3b6",
"Info": null,
"CreationTime": "2018-03-19T19:01:58.8212679Z",
"StartingScheduleId": null,
"Id": 128211
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"value": [
{
"Key": "31ade17f-5a35-4250-beea-43922dc2a20d",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"BatchExecutionKey": "cbaff1c6-32b0-468b-9ad9-b59f9ca1d3b6",
"Info": null,
"CreationTime": "2018-03-19T19:01:58.6806126Z",
"StartingScheduleId": null,
"Id": 128209
},
{
"Key": "c4caf051-9db6-486d-8078-231f9dec1a4c",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"BatchExecutionKey": "cbaff1c6-32b0-468b-9ad9-b59f9ca1d3b6",
"Info": null,
"CreationTime": "2018-03-19T19:01:58.7610094Z",
"StartingScheduleId": null,
"Id": 128210
},
{
"Key": "969552ba-cfe5-4e87-adde-c85a358ae96f",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"BatchExecutionKey": "cbaff1c6-32b0-468b-9ad9-b59f9ca1d3b6",
"Info": null,
"CreationTime": "2018-03-19T19:01:58.8212679Z",
"StartingScheduleId": null,
"Id": 128211
}
]
}
使用输入参数的自定义值启动作业
以下对 /odata/Jobs/UiPath.Server.Configuration.OData.StartJobs 端点的 POST 请求使您能够为输入参数添加自定义值,同时还可以在特定机器人上启动作业。
请注意,输入参数的 JSON 表示总长度不得超过 10,000 个字符,包括参数名称、所有转义字符、空格、方括号和参数值。如果您在进行开始作业 API 调用时为 Integer 输入参数提供值,且这些值也是有效的 ASCII 值,请注意,这些值已更改。例如,0065 已变为 53。
发布
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
请求标头
| 密钥 | 值 |
|---|---|
| 授权 | 承载 |
请求正文
{
"startInfo": {
"ReleaseKey": "429cf1cc-283c-424f-a935-43f72c2ca719",
"RobotIds": [121],
"JobsCount": 0,
"Strategy": "Specific",
"InputArguments": "{\"age\":33,\"trueOrFalse\":false,\"stringNew\":\"testing\"}"
}
}
{
"startInfo": {
"ReleaseKey": "429cf1cc-283c-424f-a935-43f72c2ca719",
"RobotIds": [121],
"JobsCount": 0,
"Strategy": "Specific",
"InputArguments": "{\"age\":33,\"trueOrFalse\":false,\"stringNew\":\"testing\"}"
}
}
响应代码
200 OK
响应正文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"value": [
{
"Key": "0fbdbecb-3677-4c33-a491-a1f7ed4ff886",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"SourceType": "Manual",
"BatchExecutionKey": "e188f409-c504-47b7-b2cf-30b8fe423f87",
"Info": null,
"CreationTime": "2018-08-27T16:41:00.4773869Z",
"StartingScheduleId": null,
"ReleaseName": "input_output_test_DocEnv",
"Type": "Unattended",
"InputArguments": "{\"age\":33,\"trueOrFalse\":false,\"stringNew\":\"testing\"}",
"OutputArguments": null,
"Id": 21767
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"value": [
{
"Key": "0fbdbecb-3677-4c33-a491-a1f7ed4ff886",
"StartTime": null,
"EndTime": null,
"State": "Pending",
"Source": "Manual",
"SourceType": "Manual",
"BatchExecutionKey": "e188f409-c504-47b7-b2cf-30b8fe423f87",
"Info": null,
"CreationTime": "2018-08-27T16:41:00.4773869Z",
"StartingScheduleId": null,
"ReleaseName": "input_output_test_DocEnv",
"Type": "Unattended",
"InputArguments": "{\"age\":33,\"trueOrFalse\":false,\"stringNew\":\"testing\"}",
"OutputArguments": null,
"Id": 21767
}
]
}
检索由指定环境执行的作业
以下示例使我们能够获取由属于环境一部分的具有 312 ID 的机器人执行的前两个作业,并扩展流程信息。
获取
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs?$top=2&$expand=Release&$filter=Release/EnvironmentId eq 312
请求标头
| 密钥 | 值 |
|---|---|
| 授权 | 承载 |
响应代码
200 OK
响应正文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"@odata.count": 26,
"value": [
{
"Key": "d3780aac-1e80-49b0-bfd3-c8ec6a3939db",
"StartTime": "2018-01-15T18:03:42.51Z",
"EndTime": "2018-01-15T18:03:44.353Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "c08beec5-243c-4e08-854d-7c100cd35214",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:03:41.56Z",
"StartingScheduleId": null,
"Id": 125153,
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": "rockerii",
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
},
{
"Key": "93b0bfc1-cb80-4594-bb3e-9f35f3efc828",
"StartTime": "2018-01-15T18:05:42.393Z",
"EndTime": "2018-01-15T18:05:42.393Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "2f894a2b-7ba1-4eee-b399-c67894a9b3ec",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:05:41.093Z",
"StartingScheduleId": null,
"Id": 125154,
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": "rockerii",
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"@odata.count": 26,
"value": [
{
"Key": "d3780aac-1e80-49b0-bfd3-c8ec6a3939db",
"StartTime": "2018-01-15T18:03:42.51Z",
"EndTime": "2018-01-15T18:03:44.353Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "c08beec5-243c-4e08-854d-7c100cd35214",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:03:41.56Z",
"StartingScheduleId": null,
"Id": 125153,
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": "rockerii",
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
},
{
"Key": "93b0bfc1-cb80-4594-bb3e-9f35f3efc828",
"StartTime": "2018-01-15T18:05:42.393Z",
"EndTime": "2018-01-15T18:05:42.393Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "2f894a2b-7ba1-4eee-b399-c67894a9b3ec",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:05:41.093Z",
"StartingScheduleId": null,
"Id": 125154,
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": "rockerii",
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
}
]
}
根据错误检索出现故障的作业
下面的调用可帮助您显示失败并提示“登录失败:未知用户名或密码错误”错误的前 2 个作业,并展开机器人和流程详细信息。您可以将此查询用于“作业详情”窗口中显示的任何类型错误。
获取
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs?$filter=(CreationTime gt 2017-01-01T00:00:00.000Z and State eq '4' and indexof(Info,'Logon failure: unknown user name or bad password') ne -1)&$expand=Robot,Release&$top=2
请求标头
| 密钥 | 值 |
|---|---|
| 授权 | 承载 |
响应代码
200 OK
响应正文
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"@odata.count": 5,
"value": [
{
"Key": "d3780aac-1e80-49b0-bfd3-c8ec6a3939db",
"StartTime": "2018-01-15T18:03:42.51Z",
"EndTime": "2018-01-15T18:03:44.353Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "c08beec5-243c-4e08-854d-7c100cd35214",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:03:41.56Z",
"StartingScheduleId": null,
"Id": 125153,
"Robot": {
"LicenseKey": null,
"MachineName": "DESKTOP-PMFQGCB",
"Name": "RoboDrulea",
"Username": "ALEX",
"Description": null,
"Type": "Unattended",
"Password": null,
"RobotEnvironments": "",
"Id": 758,
"ExecutionSettings": null
},
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": null,
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
},
{
"Key": "93b0bfc1-cb80-4594-bb3e-9f35f3efc828",
"StartTime": "2018-01-15T18:05:42.393Z",
"EndTime": "2018-01-15T18:05:42.393Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "2f894a2b-7ba1-4eee-b399-c67894a9b3ec",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:05:41.093Z",
"StartingScheduleId": null,
"Id": 125154,
"Robot": {
"LicenseKey": null,
"MachineName": "DESKTOP-PMFQGCB",
"Name": "RoboDrulea",
"Username": "ALEX",
"Description": null,
"Type": "Unattended",
"Password": null,
"RobotEnvironments": "",
"Id": 758,
"ExecutionSettings": null
},
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": null,
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
}
]
}
{
"@odata.context": "{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Jobs",
"@odata.count": 5,
"value": [
{
"Key": "d3780aac-1e80-49b0-bfd3-c8ec6a3939db",
"StartTime": "2018-01-15T18:03:42.51Z",
"EndTime": "2018-01-15T18:03:44.353Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "c08beec5-243c-4e08-854d-7c100cd35214",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:03:41.56Z",
"StartingScheduleId": null,
"Id": 125153,
"Robot": {
"LicenseKey": null,
"MachineName": "DESKTOP-PMFQGCB",
"Name": "RoboDrulea",
"Username": "ALEX",
"Description": null,
"Type": "Unattended",
"Password": null,
"RobotEnvironments": "",
"Id": 758,
"ExecutionSettings": null
},
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": null,
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
},
{
"Key": "93b0bfc1-cb80-4594-bb3e-9f35f3efc828",
"StartTime": "2018-01-15T18:05:42.393Z",
"EndTime": "2018-01-15T18:05:42.393Z",
"State": "Faulted",
"Source": "Manual",
"BatchExecutionKey": "2f894a2b-7ba1-4eee-b399-c67894a9b3ec",
"Info": "Logon failure: unknown user name or bad password",
"CreationTime": "2018-01-15T18:05:41.093Z",
"StartingScheduleId": null,
"Id": 125154,
"Robot": {
"LicenseKey": null,
"MachineName": "DESKTOP-PMFQGCB",
"Name": "RoboDrulea",
"Username": "ALEX",
"Description": null,
"Type": "Unattended",
"Password": null,
"RobotEnvironments": "",
"Id": 758,
"ExecutionSettings": null
},
"Release": {
"Key": "766d80d3-cc02-4635-b36c-e30fcf1008b1",
"ProcessKey": "Release_Project",
"ProcessVersion": "",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": null,
"Name": "Release_Project_doc_env",
"EnvironmentId": 312,
"EnvironmentName": null,
"Id": 440
}
}
]
}
停止多个作业
通过以下请求,您可以停止作业。您可以按作业 ID 或批量执行密钥来定位作业。一次只能指定其中一个参数。
可以使用以下值填充 strategy 参数:
SoftStop或1Killor2.
发布
{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StopJobs
请求标头
| 密钥 | 值 |
|---|---|
| 授权 | 承载 |
请求正文
按作业 ID 停止
{
"jobIds": [22450719, 22450728],
"strategy": "1"
}
{
"jobIds": [22450719, 22450728],
"strategy": "1"
}
按批量执行键停止
{
"batchExecutionKey": "57a377aa-af29-45bb-a0bb-22feba96eb96",
"strategy": "1"
}
{
"batchExecutionKey": "57a377aa-af29-45bb-a0bb-22feba96eb96",
"strategy": "1"
}
响应代码
200 OK
导出作业
此操作需要调用各个端点。
此端点限制为每个租户每天 100 个 API 请求。
- 通过调用
POST {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_//odata/Jobs/UiPath.Server.Configuration.OData.Export来启动导出。根据需要添加筛选器。
请求正文如下所示:
POST {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.Export?$top=1000&$expand=Robot,Machine,Release&$orderby=CreationTime%20desc HTTP/1.1
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
POST {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.Export?$top=1000&$expand=Robot,Machine,Release&$orderby=CreationTime%20desc HTTP/1.1
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
响应包含后续步骤所需的 ID:
{"@odata.context":"{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8661,"Name":"jobs-02c0398c-227b-47f4-aade-2252146d7d8f","Type":"Jobs","Status":"New","RequestedAt":"2024-01-15T07:48:34.8805788Z","ExecutedAt":null,"Size":null}
{"@odata.context":"{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8661,"Name":"jobs-02c0398c-227b-47f4-aade-2252146d7d8f","Type":"Jobs","Status":"New","RequestedAt":"2024-01-15T07:48:34.8805788Z","ExecutedAt":null,"Size":null}
- 通过调用
GET {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/orchestrator_/odata/Exports(8661)来获取请求状态,其中括号之间的文本是在第 1 步中返回的 ID。
请求正文如下所示:
GET {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8661) HTTP/1.1
Host: alpha.uipath.com
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Cookie: __cf_bm=lxqtVnB6oC_KS1nxJsWcqGK87Up9b5TGUCkZLeoaLP8-1705304914-1-AcpGG76FE03iiFdCw+u2Sq/xV3T38gqfvE7vjjZ5YHs5Iwjmrw1/1DjR5RSlqdQU1ocpukAZ1I0JLAGnkdOnumA=
GET {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8661) HTTP/1.1
Host: alpha.uipath.com
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
Cookie: __cf_bm=lxqtVnB6oC_KS1nxJsWcqGK87Up9b5TGUCkZLeoaLP8-1705304914-1-AcpGG76FE03iiFdCw+u2Sq/xV3T38gqfvE7vjjZ5YHs5Iwjmrw1/1DjR5RSlqdQU1ocpukAZ1I0JLAGnkdOnumA=
等待直至收到完整的响应:
{"@odata.context":"{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8661,"Name":"jobs-02c0398c-227b-47f4-aade-2252146d7d8f","Type":"Jobs","Status":"Completed","RequestedAt":"2024-01-15T07:48:34.88Z","ExecutedAt":"2024-01-15T07:48:38.51Z","Size":692}
{"@odata.context":"{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8661,"Name":"jobs-02c0398c-227b-47f4-aade-2252146d7d8f","Type":"Jobs","Status":"Completed","RequestedAt":"2024-01-15T07:48:34.88Z","ExecutedAt":"2024-01-15T07:48:38.51Z","Size":692}
- 通过调用
GET {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8661)/UiPath.Server.Configuration.OData.GetDownloadLink获取下载链接,其中括号之间的文本是在第 1 步中返回的 ID。
请求正文如下所示:
GET {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8661)/UiPath.Server.Configuration.OData.GetDownloadLink HTTP/1.1
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
GET {AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8661)/UiPath.Server.Configuration.OData.GetDownloadLink HTTP/1.1
Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
X-Uipath-Organizationunitid: 770643
响应包含一个 URI,您可以使用该 URI 检索数据的 CSV 导出内容:
{"@odata.context":"{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Server.Configuration.OData.BlobFileAccessDto","Uri":"<Download URI>","Verb":"GET","RequiresAuth":false,"Headers":{"Keys":[],"Values":[]}}
{"@odata.context":"{AutomationCloudURL}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Server.Configuration.OData.BlobFileAccessDto","Uri":"<Download URI>","Verb":"GET","RequiresAuth":false,"Headers":{"Keys":[],"Values":[]}}
- 向第 3 步返回的 URI 发出 GET 请求。这将触发 CSV 导出文件的下载。有关格式和命名约定的详细信息,请参阅用户指南中的导出报告部分。