orchestrator
latest
false
  • 入门指南
  • Swagger 定义
  • Orchestrator API
UiPath logo, featuring letters U and I in white

Orchestrator API 指南

Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
上次更新日期 2024年11月25日

计划请求

使用动态机器人分配启动计划

以下请求使您能够在 GMT 标准时区创建名为 ApiTest 的计划,该计划每 5 个月在星期日触发。

StartStrategy 参数用于选择作业的运行方式。
StartStrategy 的可能值

名称

描述

文件夹上下文

-1

所有机器人

为流程环境中存在的每个机器人运行一次作业。

传统

0

自定义机器人

在每个指定的机器人上运行一次作业。 要指定机器人,请在 ExecutorRobots中包含机器人 ID 作为值。 例如,“ExecutorRobots”:[ {“Id”:44881

传统

1

1 个机器人

在有权访问流程所在文件夹的任何用户的动态选择的机器人上运行作业。

您还可以将作业设置为在 MachineRobots中指定的机器人上运行。 有关示例,请参阅下面的示例请求正文。

现代

任何其他号码

动态分配

创建指定数量的作业,并从流程的新式文件夹中的可用机器人或传统文件夹环境中的机器人中动态选择要在其上运行作业的机器人。

对于新式文件夹,您还可以使用列表参数 MachineRobots指定一个或多个计算机模板、机器人,或同时指定计算机模板和机器人。 在本例中, StartStrategy 值表示在每个指定的机器人或机器人-计算机组合上执行作业的次数。
这不适用于传统文件夹,如果指定,则忽略 ExecutorRobots 参数。

经典或现代

发布

https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/ProcessSchedules

请求标头

密钥

授权

承载

请求正文

{
  "Name":"ApiTest",
  "ReleaseId":75,
  "ReleaseName":"BlankProcess_DocEnv",
  "StartProcessCron":"0 0 0 ? 1/5 SUN *",
  "StartProcessCronDetails":"{\"type\":4,\"minutely\":{},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[{\"id\":\"SUN\",\"weekly\":\"Sunday\",\"monthly\":\"Sunday\"}],\"atMinute\":0,\"atHour\":0,\"frequencyInMonths\":\"5\"},\"advancedCronExpression\":\"\"}",
  "StartStrategy":15,
  "ExecutorRobots":[],
  "MachineRobots":[
    {
      "MachineId":null,
      "MachineName":null,
      "RobotId":44880,
      "RobotUserName":"acme\\john.doe"
    }
  ],
  "StopProcessExpression":"",
  "StopStrategy":null,
  "TimeZoneId":"GMT Standard Time"
}{
  "Name":"ApiTest",
  "ReleaseId":75,
  "ReleaseName":"BlankProcess_DocEnv",
  "StartProcessCron":"0 0 0 ? 1/5 SUN *",
  "StartProcessCronDetails":"{\"type\":4,\"minutely\":{},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[{\"id\":\"SUN\",\"weekly\":\"Sunday\",\"monthly\":\"Sunday\"}],\"atMinute\":0,\"atHour\":0,\"frequencyInMonths\":\"5\"},\"advancedCronExpression\":\"\"}",
  "StartStrategy":15,
  "ExecutorRobots":[],
  "MachineRobots":[
    {
      "MachineId":null,
      "MachineName":null,
      "RobotId":44880,
      "RobotUserName":"acme\\john.doe"
    }
  ],
  "StopProcessExpression":"",
  "StopStrategy":null,
  "TimeZoneId":"GMT Standard Time"
}

响应代码

200 OK

响应正文

{
    "@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#ProcessSchedules/$entity",
    "Enabled": true,
    "Name": "ApiTest",
    "ReleaseId": 75,
    "ReleaseKey": "00000000-0000-0000-0000-000000000000",
    "ReleaseName": null,
    "PackageName": null,
    "EnvironmentName": null,
    "EnvironmentId": "0",
    "StartProcessCron": "0 0 0 ? 1/5 SUN *",
    "StartProcessCronDetails": "{\"type\":4,\"minutely\":{},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[{\"id\":\"SUN\",\"weekly\":\"Sunday\",\"monthly\":\"Sunday\"}],\"atMinute\":0,\"atHour\":0,\"frequencyInMonths\":\"5\"},\"advancedCronExpression\":\"\"}",
    "StartProcessCronSummary": null,
    "StartProcessNextOccurrence": null,
    "StartStrategy": 15,
    "StopProcessExpression": "",
    "StopStrategy": null,
    "ExternalJobKey": "8cda4b35-e835-445b-b477-1ea0961d62e5",
    "TimeZoneId": "GMT Standard Time",
    "TimeZoneIana": "Europe/London",
    "UseCalendar": false,
    "StopProcessDate": null,
    "InputArguments": "{}",
    "Id": 43
}{
    "@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#ProcessSchedules/$entity",
    "Enabled": true,
    "Name": "ApiTest",
    "ReleaseId": 75,
    "ReleaseKey": "00000000-0000-0000-0000-000000000000",
    "ReleaseName": null,
    "PackageName": null,
    "EnvironmentName": null,
    "EnvironmentId": "0",
    "StartProcessCron": "0 0 0 ? 1/5 SUN *",
    "StartProcessCronDetails": "{\"type\":4,\"minutely\":{},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[{\"id\":\"SUN\",\"weekly\":\"Sunday\",\"monthly\":\"Sunday\"}],\"atMinute\":0,\"atHour\":0,\"frequencyInMonths\":\"5\"},\"advancedCronExpression\":\"\"}",
    "StartProcessCronSummary": null,
    "StartProcessNextOccurrence": null,
    "StartStrategy": 15,
    "StopProcessExpression": "",
    "StopStrategy": null,
    "ExternalJobKey": "8cda4b35-e835-445b-b477-1ea0961d62e5",
    "TimeZoneId": "GMT Standard Time",
    "TimeZoneIana": "Europe/London",
    "UseCalendar": false,
    "StopProcessDate": null,
    "InputArguments": "{}",
    "Id": 43
}

使用输入参数值启动计划

通过以下对 /odata/ProcessSchedules 端点的 POST 请求,您可以在 ID 为 55 的流程上创建名称为“API_schedule_test”的已启用计划,同时还可以为某些流程的参数添加自定义值。 该计划每五分钟在所有可用的机器人上启动,并且不考虑非工作日。
注意:全部输入参数的 JSON 表示不得超过 10,000 个字符,包括参数名称、所有转义字符、空格、方括号和参数值。

发布

https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/ProcessSchedules

请求标头

密钥

授权

承载

请求正文

{
      "Enabled": true,
      "Name": "API_schedule_test",
      "ReleaseId": 55,
      "ReleaseKey": "429cf1cc-283c-424f-a935-43f72c2ca719",
      "ReleaseName": "input_output_test_DocEnv",
      "PackageName": "input_output_test",
      "EnvironmentName": "DocEnv",
      "EnvironmentId": "7",
      "StartProcessCron": "0 0/5 * 1/1 * ? *",
      "StartProcessCronDetails": "{\"type\":0,\"minutely\":{\"atMinute\":5},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[]},\"advancedCronExpression\":\"\"}",
      "StartProcessCronSummary": "Every 5 minutes",
      "StartProcessNextOccurrence": null,
      "StartStrategy": 0,
      "StopProcessExpression": "",
      "StopStrategy": null,
      "ExternalJobKey": "af486c19-c797-48cd-b586-cfb7a12110a2",
      "TimeZoneId": "Morocco Standard Time",
      "TimeZoneIana": "Africa/Casablanca",
      "UseCalendar": false,
      "StopProcessDate": null,
      "InputArguments": "{\"arrayStrings\":[\"test\",\"test\"],\"age\":666,\"trueOrFalse\":false,\"dateNow\":\"2012-04-23T18:25:43.511Z\",\"stringNew\":\"stringTest\",\"DoubleTest\":7.555555}",
      "Id": 37
    }{
      "Enabled": true,
      "Name": "API_schedule_test",
      "ReleaseId": 55,
      "ReleaseKey": "429cf1cc-283c-424f-a935-43f72c2ca719",
      "ReleaseName": "input_output_test_DocEnv",
      "PackageName": "input_output_test",
      "EnvironmentName": "DocEnv",
      "EnvironmentId": "7",
      "StartProcessCron": "0 0/5 * 1/1 * ? *",
      "StartProcessCronDetails": "{\"type\":0,\"minutely\":{\"atMinute\":5},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[]},\"advancedCronExpression\":\"\"}",
      "StartProcessCronSummary": "Every 5 minutes",
      "StartProcessNextOccurrence": null,
      "StartStrategy": 0,
      "StopProcessExpression": "",
      "StopStrategy": null,
      "ExternalJobKey": "af486c19-c797-48cd-b586-cfb7a12110a2",
      "TimeZoneId": "Morocco Standard Time",
      "TimeZoneIana": "Africa/Casablanca",
      "UseCalendar": false,
      "StopProcessDate": null,
      "InputArguments": "{\"arrayStrings\":[\"test\",\"test\"],\"age\":666,\"trueOrFalse\":false,\"dateNow\":\"2012-04-23T18:25:43.511Z\",\"stringNew\":\"stringTest\",\"DoubleTest\":7.555555}",
      "Id": 37
    }

响应代码

200 OK

响应正文

{
    "@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#ProcessSchedules/$entity",
    "Enabled": true,
    "Name": "API_schedule_test",
    "ReleaseId": 55,
    "ReleaseKey": "00000000-0000-0000-0000-000000000000",
    "ReleaseName": null,
    "PackageName": null,
    "EnvironmentName": null,
    "EnvironmentId": "0",
    "StartProcessCron": "0 0/5 * 1/1 * ? *",
    "StartProcessCronDetails": "{\"type\":0,\"minutely\":{\"atMinute\":5},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[]},\"advancedCronExpression\":\"\"}",
    "StartProcessCronSummary": "Every 5 minutes",
    "StartProcessNextOccurrence": null,
    "StartStrategy": 0,
    "StopProcessExpression": "",
    "StopStrategy": null,
    "ExternalJobKey": "7ecbff8d-832d-41e1-a3ed-aee0957caffe",
    "TimeZoneId": "Morocco Standard Time",
    "TimeZoneIana": "Africa/Casablanca",
    "UseCalendar": false,
    "StopProcessDate": null,
    "InputArguments": "{\"arrayStrings\":[\"test\",\"test\"],\"age\":666,\"trueOrFalse\":false,\"dateNow\":\"2012-04-23T18:25:43.511Z\",\"stringNew\":\"stringTest\",\"DoubleTest\":7.555555,\"inOutTry\":\"2012-04-23T18:25:43.511Z\"}",
    "Id": 37
}{
    "@odata.context": "https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#ProcessSchedules/$entity",
    "Enabled": true,
    "Name": "API_schedule_test",
    "ReleaseId": 55,
    "ReleaseKey": "00000000-0000-0000-0000-000000000000",
    "ReleaseName": null,
    "PackageName": null,
    "EnvironmentName": null,
    "EnvironmentId": "0",
    "StartProcessCron": "0 0/5 * 1/1 * ? *",
    "StartProcessCronDetails": "{\"type\":0,\"minutely\":{\"atMinute\":5},\"hourly\":{},\"daily\":{},\"weekly\":{\"weekdays\":[]},\"monthly\":{\"weekdays\":[]},\"advancedCronExpression\":\"\"}",
    "StartProcessCronSummary": "Every 5 minutes",
    "StartProcessNextOccurrence": null,
    "StartStrategy": 0,
    "StopProcessExpression": "",
    "StopStrategy": null,
    "ExternalJobKey": "7ecbff8d-832d-41e1-a3ed-aee0957caffe",
    "TimeZoneId": "Morocco Standard Time",
    "TimeZoneIana": "Africa/Casablanca",
    "UseCalendar": false,
    "StopProcessDate": null,
    "InputArguments": "{\"arrayStrings\":[\"test\",\"test\"],\"age\":666,\"trueOrFalse\":false,\"dateNow\":\"2012-04-23T18:25:43.511Z\",\"stringNew\":\"stringTest\",\"DoubleTest\":7.555555,\"inOutTry\":\"2012-04-23T18:25:43.511Z\"}",
    "Id": 37
}

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。