UiPath Orchestrator接口(API)方式启动流程(作业)
以API的方式调用机器人开始作业
原文来自: How To Start A Job In PowerShell Using Orchestrator API Endpoints?
中文互联网上似乎没有找到相关资料,有一篇似乎是以前的,现在不适用了,故写下本文。
文章目录
前言
所有接口调试基于Postman
需要用到的接口:{
{url}}为:https://cloud.uipath.com/用户名/租户名,如:https://cloud.uipath.com/admin/DefaultTenant
- https://cloud.uipath.com/identity_/connect/token
- { {url}}/orchestrator_/odata/Folders
- { {url}}/orchestrator_/odata/Folders/UiPath.Server.Configuration.OData.GetMachinesForFolder(key={ {folderID}})
- { {url}}/orchestrator_/odata/Robots/UiPath.Server.Configuration.OData.GetConfiguredRobots
- { {url}}/orchestrator_/odata/Releases
- { {url}}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
一、概述
使用指定文件夹下的指定机器上的指定的机器人执行指定流程(作业):
- OC上启用External Applications(外部应用);
- 通过External Applications获取到access_token;
- 通过access_token查询到文件夹Id、机器(设备)Id、机器人Id。
二、详细步骤
1.在OC上新建External Applications
- 点击Admin-External Applications-Add Application
- 输入app名称;
选择加密应用(也可以选择不加密,这里没有尝试过,可以尝试一下);
添加应用权限范围-选择Orchestrator API Access,选择Application Scope(s)(User Scope可不选,具体范围我这边也没有深究),点击保存;
设置访问该App的URL:https://cloud.uipath.com/identity_/connect/authorize
- 点击保存后出现这两个App ID、App Secret,
记录下来,如果没有出现弹窗,可点击Edit编辑查看。