orchestrator
2020.10
false
  • Getting Started
  • Swagger Definition
  • Orchestrator APIs
UiPath logo, featuring letters U and I in white
OUT OF SUPPORT
Orchestrator API Guide
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Jun 18, 2024

Tasks Requests

Retrieve Tasks in a Folder

This request enables you to retrieve all the tasks in the classic folders that the user has access to.

Note:

This endpoint only retrieves actions in classic folders and will be deprecated in the future.

Use the following ones to retrieve actions irrespective of the folder type:

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

GET

{OrchestratorURL}/odata/Tasks?$top=2

Request headers

Key

Value

Authorization

Bearer

Response code

200 OK

Response body

{
  "@odata.context": "{OrchestratorURL}/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": "{OrchestratorURL}/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
    }

Retrieve Task Details

This request enables you to retrieve task details according to the TaskId. The TaskId must be included in the request. For example, {OrchestratorURL}/odata/Tasks(194).

GET

{OrchestratorURL}/odata/Tasks(194)

Request headers

Key

Value

Authorization

Bearer

Response code

200 OK

Response body

{
  "@odata.context": "{OrchestratorURL}/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": "{OrchestratorURL}/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
}

Assign a Task to a User

This request enables you to assign a task to a user, according to the TaskId and UserId. A single request can handle assignment of multiple tasks to different users.

POST

{OrchestratorURL}/odata/Tasks/UiPath.Server.Configuration.OData.AssignTasks

Request headers

Key

Value

Authorization

Bearer

Request body

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

Response code

200 OK

Response body

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

Unassign Tasks

This request enables you to clear the assignment for one or multiple tasks based on the taskIds provided.

POST

{OrchestratorURL}/odata/Tasks/UiPath.Server.Configuration.OData.UnassignTasks

Request headers

Key

Value

Authorization

Bearer

Request body

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

Response code

200 OK

Response body

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

Return Users With View and Edit Permissions on Tasks

This request enables you to retrieve users with View and Edit permissions on Tasks. The folder ID must be included in the request.

GET

{OrchestratorURL}/odata/Tasks/UiPath.Server.Configuration.OData.GetTaskUsers(organizationUnitId=36886)

Request headers

Key

Value

Authorization

Bearer

Response code

200 OK

Response body

{
  "@odata.context": "{OrchestratorURL}/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": "{OrchestratorURL}/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
    }

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.