Skip to main content

Search Human Tasks

Endpoint: POST /api/human/tasks/search

Retrieves a list of Human tasks based on the provided search criteria.

The invoking user should be one of the following:

  • Cluster admin
  • Task owner of the Human task
  • Task assignee
tip

You can construct your search query in the Conductor UI (Executions > Human Tasks) and open the browser developer console’s network tab to get the same search request as an API payload.

Request body

Format the request as an object containing the following search parameters.

ParameterDescriptionTypeRequired/ Optional
searchTypeThe type of search. Supported values:
  • ADMIN—Shows all Human task executions only if the user is a cluster admin.
  • INBOX—Shows all Human task executions assigned to the requesting user.
stringRequired.
sizeThe start of the search results list, which is used for pagination.integerRequired.
startThe number of search results that should be returned from the specified start.integerRequired.
assigneesThe assignee details.array of objectsOptional.
assignees. userTypeThe type of user or group that will be assigned to the task. Supported values:
  • External User—The assignee is a user residing outside the Conductor cluster in an external system.
  • External Group—The assignee is a group residing outside the Conductor cluster in an external system.
  • Conductor User—The assignee is a user in the Conductor cluster.
  • Conductor Group—The assignee is a group in the Conductor cluster.
array of objectsRequired if searching by assignees.
assignees. userThe user or group ID for the assignee. The value depends on the user type.
  • External User—Provide the user's email that is managed and verified in an external system.
  • External Group—Provide the name of the group that is managed and verified in an external system.
  • Conductor User—Provide the user’s Conductor email.
  • Conductor Group—Provide the Conductor group name.
stringRequired if searching by assignees.
claimantsThe claimant details.array of objectsOptional.
claimants. userTypeThe type of user or group that will be assigned to the task. Supported values:
  • External User—The assignee is a user residing outside the Conductor cluster in an external system.
  • External Group—The assignee is a group residing outside the Conductor cluster in an external system.
  • Conductor User—The assignee is a user in the Conductor cluster.
  • Conductor Group—The assignee is a group in the Conductor cluster.
stringRequired if searching by claimants.
claimants. userThe user or group ID for the claimant. The value depends on the user type.
  • External User—Provide the user's email that is managed and verified in an external system.
  • External Group—Provide the name of the group that is managed and verified in an external system.
  • Conductor User—Provide the user’s Conductor email.
  • Conductor Group—Provide the Conductor group name.
stringRequired if searching by claimants.
definitionNamesThe task definition name for the Human task.array of stringsOptional.
displayNamesThe task display name specified in the workflow definition.array of stringsOptional.
taskRefNamesThe task reference name for the Human task.array of stringsOptional.
fullTextQueryAll full-text indexed data associated with the Human task (task input, name, and so on). Only AND and OR operations are supported. "*" can be used as a wildcard character to return partial matches.stringOptional.
statesThe Human task status. Supported values:
  • PENDING
  • ASSIGNED
  • IN_PROGRESS
  • COMPLETED
  • TIMED_OUT
  • DELETED
array of stringsOptional.
taskInputQueryThe query expression for the input data to the Human task, in the format FIELD = VALUE or FIELD IN (value1, value2). Only AND and OR operations are supported.

Note: This query only searches for exact matches.
stringOptional.
taskOutputQueryThe query expression for the output data from the Human task, in the format FIELD = VALUE or FIELD IN (value1, value2). Only AND and OR operations are supported.

Note: This query only searches for exact matches.
stringOptional.
updateStartTimeThe start range for Human task’s last updated time.integerOptional.
updateEndTimeThe end range for Human task’s last updated time.integerOptional.
workflowIdsThe workflow ID associated with the Human task.array of stringsOptional.
workflowNamesThe workflow name associated to the Human task.array of stringsOptional.

Response

Returns the Human task object.

Examples

Search for incomplete Human tasks

Request

curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/human/tasks/search' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"size":20,"states":["IN_PROGRESS", "PENDING", "ASSIGNED"],"taskOutputQuery":"","taskInputQuery":"","fullTextQuery":"","definitionNames":[],"taskRefNames":[],"displayNames":["Expense Approval"],"claimants":[],"assignees":[],"workflowIds":[],"start":0}'

Response

{
"totalHits": 1,
"results": [
{
"createdBy": "user@example.com",
"updatedBy": "user@example.com",
"taskId": "b5070997-d326-11ef-a7d0-3e3f9199f5b3",
"state": "ASSIGNED",
"displayName": "Expense Approval",
"definitionName": "formSubmission",
"workflowId": "b4e7c1c1-d326-11ef-a7d0-3e3f9199f5b3",
"workflowName": "Expensing",
"taskRefName": "formSubmission_ref",
"input": {
"Confirm": false,
"_createdBy": "user@example.com",
"enterAssets": "",
"__humanTaskDefinition": {
"assignments": [],
"displayName": "Expense Approval",
"userFormTemplate": {
"name": "Expense Form",
"version": 1
},
"assignmentCompletionStrategy": "LEAVE_OPEN"
},
"__humanTaskProcessContext": {
"state": "ASSIGNED",
"lastUpdated": 1736934867236,
"humanTaskActionLogs": [
{
"id": "fefd9fa7-a287-43dc-9d4a-7e57d4bd7721",
"state": "ASSIGNED",
"action": "ASSIGNMENTS_COMPLETED",
"actedBy": "system",
"stateStart": 1736934867236
}
],
"humanTaskTriggerLog": [],
"assignmentsCompleted": true,
"skippedAssigneeIndexes": []
}
},
"output": {},
"createdOn": 1736934867118,
"updatedOn": 1736934867236
}
],
"hits": 1,
"start": 0,
"pageSizeLimit": 20
}