Search tasks
POSThttp://localhost:8080/v1/tasks/search
Returns the list of tasks that satisfy search request params.
- If an empty body is provided, all tasks are returned.
- Only one of
[searchAfter, searchAfterOrEqual, searchBefore, searchBeforeOrEqual]
search options must be present in request.
Request​
- application/json
Body
Possible values: [CREATED
, COMPLETED
, CANCELED
, FAILED
]
The state of the tasks.
Are the tasks assigned?
Who is assigned to the tasks?
The assignee is one of the given assignees.
What's the BPMN flow node?
Given group is in candidate groups list.
At least one of the given groups is in candidate groups list.
Given user is in candidate user list.
At least one of the given users is in candidate user list.
Reference to process definition (renamed equivalent of TaskQuery.processDefinitionId field).
Reference to process instance (renamed equivalent of TaskQuery.processInstanceId field)
Size of tasks page (default = 50).
followUpDate object
dueDate object
taskVariables object[]
An array of Tenant IDs to filter tasks. When multi-tenancy is
enabled, tasks associated with the specified tenant IDs are returned;
if disabled, this parameter is ignored.
sort object[]
Used to return a paginated result. Array of values that should be copied from sortValues of one of the tasks from the current search results page.
It enables the API to return a page of tasks that directly follow the task identified by the provided values, with respect to the sorting order.
Used to return a paginated result. Array of values that should be copied from sortValues of one of the tasks from the current search results page.
It enables the API to return a page of tasks that directly follow or are equal to the task identified by the provided values, with respect to the sorting order.
Used to return a paginated result. Array of values that should be copied from sortValues of one of the tasks from the current search results page.
It enables the API to return a page of tasks that directly precede the task identified by the provided values, with respect to the sorting order.
Used to return a paginated result. Array of values that should be copied from sortValues of one of the tasks from the current search results page.
It enables the API to return a page of tasks that directly precede or are equal to the task identified by the provided values, with respect to the sorting order.
includeVariables object[]
Possible values: [JOB_WORKER
, ZEEBE_USER_TASK
]
priority object
Responses​
- 200
- 400
On success returned.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
The unique identifier of the task.
The name of the task.
User task ID from the BPMN definition.
The name of the process.
When was the task created (renamed equivalent of Task.creationTime
field).
When was the task completed (renamed equivalent of Task.completionTime
field).
The username/id of who is assigned to the task.
Possible values: [CREATED
, COMPLETED
, CANCELED
, FAILED
]
The state of the task.
Array of values to be copied into TaskSearchRequest
to request for next or previous page of tasks.
A flag to show that the task is first in the current filter.
Reference to the task form.
Reference to the ID of a deployed form. If the form is not deployed, this property is null.
Reference to the version of a deployed form. If the form is not deployed, this property is null.
Is the form embedded for this task? If there is no form, this property is null.
Reference to process definition (renamed equivalent of Task.processDefinitionId
field).
Reference to process instance id (renamed equivalent of Task.processInstanceId
field).
The tenant ID associated with the task.
The due date for the task.
The follow-up date for the task.
The candidate groups for the task.
The candidate users for the task.
variables object[]
Possible values: [JOB_WORKER
, ZEEBE_USER_TASK
]
Possible values: [0,100]
Default value: 50
The priority of a user task. The higher the value the higher the priority. Applicable only for Camunda user tasks.
[
{
"id": "string",
"name": "string",
"taskDefinitionId": "string",
"processName": "string",
"creationDate": "string",
"completionDate": "string",
"assignee": "string",
"taskState": "CREATED",
"sortValues": [
"string"
],
"isFirst": true,
"formKey": "string",
"formId": "string",
"formVersion": 0,
"isFormEmbedded": true,
"processDefinitionKey": "string",
"processInstanceKey": "string",
"tenantId": "string",
"dueDate": "2024-08-16T13:54:01.387Z",
"followUpDate": "2024-08-16T13:54:01.387Z",
"candidateGroups": [
"string"
],
"candidateUsers": [
"string"
],
"variables": [
{
"id": "string",
"name": "string",
"value": "string",
"isValueTruncated": true,
"previewValue": "string",
"draft": {
"value": "string",
"isValueTruncated": true,
"previewValue": "string"
}
}
],
"implementation": "JOB_WORKER",
"priority": 50
}
]
An error is returned when more than one search parameters among [searchAfter, searchAfterOrEqual, searchBefore, searchBeforeOrEqual]
are present in request
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a 'Bad Request' error, 404 indicates a 'Not Found' error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (e.g., in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}
Authorization: TASKLIST-SESSION
name: TASKLIST-SESSIONtype: apiKeydescription: Cookie-based authentication is only available on Self-Managed clusters.in: cookie
name: bearer-keytype: httpscheme: bearerbearerFormat: JWT
- curl
- java
- nodejs
- csharp
- python
- go
- CURL
curl -L -X POST 'http://localhost:8080/v1/tasks/search' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"state": "CREATED",
"assigned": true,
"assignee": "string",
"assignees": [
"string"
],
"taskDefinitionId": "string",
"candidateGroup": "string",
"candidateGroups": [
"string"
],
"candidateUser": "string",
"candidateUsers": [
"string"
],
"processDefinitionKey": "string",
"processInstanceKey": "string",
"pageSize": 0,
"followUpDate": {
"from": "2024-08-16T13:54:01.375Z",
"to": "2024-08-16T13:54:01.375Z"
},
"dueDate": {
"from": "2024-08-16T13:54:01.375Z",
"to": "2024-08-16T13:54:01.375Z"
},
"taskVariables": [
{
"name": "string",
"value": "string",
"operator": "eq"
}
],
"tenantIds": [
"string"
],
"sort": [
{
"field": "completionTime",
"order": "ASC"
}
],
"searchAfter": [
"string"
],
"searchAfterOrEqual": [
"string"
],
"searchBefore": [
"string"
],
"searchBeforeOrEqual": [
"string"
],
"includeVariables": [
{
"name": "string",
"alwaysReturnFullValue": false
}
],
"implementation": "JOB_WORKER",
"priority": {
"eq": 0,
"gte": 0,
"gt": 0,
"lt": 0,
"lte": 0
}
}'