orchestrator
latest
false
  • 入门指南
  • Swagger 定义
  • Orchestrator API
UiPath logo, featuring letters U and I in white
Orchestrator API 指南
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 2024年11月20日

任务请求

检索文件夹中的任务

此请求使您能够检索用户有权访问的传统文件夹中的所有任务。

备注:

此端点仅检索传统文件夹中的操作,并且将来会弃用。

无论文件夹类型如何,都可以使用以下方法检索操作:

  • odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFolders
  • odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFoldersForAdmin

获取

https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks?$top=2

请求标头

密钥

授权

承载

响应代码

200 OK

响应正文

{
  "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Tasks",
  "@odata.count": 21,
  "value": [
    {
      "Title": "Performance Review",
      "Type": "FormTask",
      "Priority": "Medium",
      "Status": "Completed",
      "CreationTime": "2019-10-16T11:39:30.41Z",
      "TaskCatalogName": "Expecto Patronum",
      "OrganizationUnitId": 828,
      "IsCompleted": true,
      "Id": 63
    },
    {
      "Title": "Performance Review",
      "Type": "FormTask",
      "Priority": "Medium",
      "Status": "Completed",
      "CreationTime": "2019-10-16T11:40:24.88Z",
      "TaskCatalogName": "Expecto Patronum",
      "OrganizationUnitId": 828,
      "IsCompleted": true,
      "Id": 64
    }{
  "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Tasks",
  "@odata.count": 21,
  "value": [
    {
      "Title": "Performance Review",
      "Type": "FormTask",
      "Priority": "Medium",
      "Status": "Completed",
      "CreationTime": "2019-10-16T11:39:30.41Z",
      "TaskCatalogName": "Expecto Patronum",
      "OrganizationUnitId": 828,
      "IsCompleted": true,
      "Id": 63
    },
    {
      "Title": "Performance Review",
      "Type": "FormTask",
      "Priority": "Medium",
      "Status": "Completed",
      "CreationTime": "2019-10-16T11:40:24.88Z",
      "TaskCatalogName": "Expecto Patronum",
      "OrganizationUnitId": 828,
      "IsCompleted": true,
      "Id": 64
    }

检索任务详细信息

此请求使您能够根据 TaskId检索任务详细信息。 请求中必须包含 TaskId 。 例如 https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks(194)

获取

https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks(194)

请求标头

密钥

授权

承载

响应代码

200 OK

响应正文

{
  "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Tasks/$entity",
  "Title": "Verify Credentials",
  "Type": "FormTask",
  "Priority": "Critical",
  "Status": "Unassigned",
  "CreationTime": "2019-12-12T17:25:03.02Z",
  "TaskCatalogName": "Auth",
  "OrganizationUnitId": 828,
  "IsCompleted": false,
  "Id": 194
}{
  "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Tasks/$entity",
  "Title": "Verify Credentials",
  "Type": "FormTask",
  "Priority": "Critical",
  "Status": "Unassigned",
  "CreationTime": "2019-12-12T17:25:03.02Z",
  "TaskCatalogName": "Auth",
  "OrganizationUnitId": 828,
  "IsCompleted": false,
  "Id": 194
}

将任务分配给用户

此请求使您能够根据 TaskIdUserId将任务分配给用户。 单个请求可以处理将多个任务分配给不同用户的问题。

发布

https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks/UiPath.Server.Configuration.OData.AssignTasks

请求标头

密钥

授权

承载

请求正文

{
"taskAssignments": 
[   
 {
      "TaskId": 194,
      "UserId": 52454
    }
]
}{
"taskAssignments": 
[   
 {
      "TaskId": 194,
      "UserId": 52454
    }
]
}

响应代码

200 OK

响应正文

{
    "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Orchestrator.Tasks.Dto.TaskAssignmentErrorResponse)",
    "value": [
        {
            "TaskId": 195,
            "UserId": 52454,
            "ErrorCode": 2400,
            "ErrorMessage": "Task is already assigned"
        }
    ]
}{
    "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Orchestrator.Tasks.Dto.TaskAssignmentErrorResponse)",
    "value": [
        {
            "TaskId": 195,
            "UserId": 52454,
            "ErrorCode": 2400,
            "ErrorMessage": "Task is already assigned"
        }
    ]
}

未分配的任务

此请求使您能够根据提供的 taskIds 清除一个或多个任务的分配。

发布

https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks/UiPath.Server.Configuration.OData.UnassignTasks

请求标头

密钥

授权

承载

请求正文

{
  "taskIds": [
    194,177
  ]
}{
  "taskIds": [
    194,177
  ]
}

响应代码

200 OK

响应正文

{
    "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Orchestrator.Tasks.Dto.TaskAssignmentErrorResponse)",
    "value": [
        {
            "TaskId": 177,
            "UserId": null,
            "ErrorCode": 2400,
            "ErrorMessage": "This task is in completed state"
        }
    ]
}{
    "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Orchestrator.Tasks.Dto.TaskAssignmentErrorResponse)",
    "value": [
        {
            "TaskId": 177,
            "UserId": null,
            "ErrorCode": 2400,
            "ErrorMessage": "This task is in completed state"
        }
    ]
}

返回具有任务查看和编辑权限的用户

此请求使您能够检索对任务具有 查看编辑 权限的用户。 请求中必须包含文件夹 ID。

获取

https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks/UiPath.Server.Configuration.OData.GetTaskUsers(organizationUnitId=36886)

请求标头

密钥

授权

承载

响应代码

200 OK

响应正文

{
  "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UserLoginInfo",
  "@odata.count": 13,
  "value": [
    {
      "Name": "Harry",
      "Surname": "Potter",
      "UserName": "harry.potter@uipath.com",
      "EmailAddress": "harry.potter@uipath.com",
      "Id": 52454
    },
    {
      "Name": "Severus",
      "Surname": "Snape",
      "UserName": "severus.snape@uipath",
      "EmailAddress": "severus.snape@uipath.com",
      "Id": 52917
    }{
  "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UserLoginInfo",
  "@odata.count": 13,
  "value": [
    {
      "Name": "Harry",
      "Surname": "Potter",
      "UserName": "harry.potter@uipath.com",
      "EmailAddress": "harry.potter@uipath.com",
      "Id": 52454
    },
    {
      "Name": "Severus",
      "Surname": "Snape",
      "UserName": "severus.snape@uipath",
      "EmailAddress": "severus.snape@uipath.com",
      "Id": 52917
    }

删除任务

此请求使您能够按 ID 删除一个或多个任务。

发布

https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/Tasks/UiPath.Server.Configuration.OData.DeleteTasks

请求标头

密钥

授权

承载

请求正文

{
  "taskIds": [
     104177
  ]
}{
  "taskIds": [
     104177
  ]
}

响应代码

200 OK

响应正文

{
    "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Orchestrator.Tasks.Dto.TaskAssignmentErrorResponse)",
    "value": [
        {
            "TaskId": 104177,
            "UserId": null,
            "ErrorCode": 2427,
            "ErrorMessage": "You do not have the required permissions to delete this action"
        }
    ]
}{
    "@odata.context": "https://govcloud.uipath.us/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Orchestrator.Tasks.Dto.TaskAssignmentErrorResponse)",
    "value": [
        {
            "TaskId": 104177,
            "UserId": null,
            "ErrorCode": 2427,
            "ErrorMessage": "You do not have the required permissions to delete this action"
        }
    ]
}

此页面有帮助吗?

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