Skip to main content
POST
/
task
curl --request POST \
--url http://{host}:{port}/{contextPath}/task \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"taskVariables": [
{
"name": "varName",
"value": "varValue",
"operator": "eq"
},
{
"name": "anotherVarName",
"value": 30,
"operator": "neq"
}
],
"processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey",
"assigneeIn": "anAssignee,anotherAssignee",
"priority": 10,
"sorting": [
{
"sortBy": "dueDate",
"sortOrder": "asc"
},
{
"sortBy": "processVariable",
"sortOrder": "desc",
"parameters": {
"variable": "orderId",
"type": "String"
}
}
]
}'
[
{
"id": "anId",
"name": "aName",
"assignee": "anAssignee",
"created": "2013-01-23T13:42:42.453+0200",
"due": "2013-01-23T13:49:42.342+0200",
"followUp:": "2013-01-23T13:44:42.546+0200",
"lastUpdated:": "2013-01-23T13:44:42.546+0200",
"delegationState": "RESOLVED",
"description": "aDescription",
"executionId": "anExecution",
"owner": "anOwner",
"parentTaskId": "aParentId",
"priority": 10,
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"caseDefinitionId": "aCaseDefId",
"caseInstanceId": "aCaseInstId",
"caseExecutionId": "aCaseExecution",
"taskDefinitionKey": "aTaskDefinitionKey",
"suspended": false,
"formKey": "aFormKey",
"camundaFormRef": {
"key": "aCamundaFormKey",
"binding": "version",
"version": 2
},
"tenantId": "aTenantId",
"taskState": "aTaskState"
}
]

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

firstResult
integer

Pagination of results. Specifies the index of the first result to return.

maxResults
integer

Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Body

application/json

A Task query which defines a group of Tasks.

taskId
string | null

Restrict to task with the given id.

taskIdIn
string[] | null

Restrict to tasks with any of the given ids.

processInstanceId
string | null

Restrict to tasks that belong to process instances with the given id.

processInstanceIdIn
string[] | null

Restrict to tasks that belong to process instances with the given ids.

processInstanceBusinessKey
string | null

Restrict to tasks that belong to process instances with the given business key.

processInstanceBusinessKeyExpression
string | null

Restrict to tasks that belong to process instances with the given business key which is described by an expression. See the user guide for more information on available functions.

processInstanceBusinessKeyIn
string[] | null

Restrict to tasks that belong to process instances with one of the give business keys. The keys need to be in a comma-separated list.

processInstanceBusinessKeyLike
string | null

Restrict to tasks that have a process instance business key that has the parameter value as a substring.

processInstanceBusinessKeyLikeExpression
string | null

Restrict to tasks that have a process instance business key that has the parameter value as a substring and is described by an expression. See the user guide for more information on available functions.

processDefinitionId
string | null

Restrict to tasks that belong to a process definition with the given id.

processDefinitionKey
string | null

Restrict to tasks that belong to a process definition with the given key.

processDefinitionKeyIn
string[] | null

Restrict to tasks that belong to a process definition with one of the given keys. The keys need to be in a comma-separated list.

processDefinitionName
string | null

Restrict to tasks that belong to a process definition with the given name.

processDefinitionNameLike
string | null

Restrict to tasks that have a process definition name that has the parameter value as a substring.

executionId
string | null

Restrict to tasks that belong to an execution with the given id.

caseInstanceId
string | null

Restrict to tasks that belong to case instances with the given id.

caseInstanceBusinessKey
string | null

Restrict to tasks that belong to case instances with the given business key.

caseInstanceBusinessKeyLike
string | null

Restrict to tasks that have a case instance business key that has the parameter value as a substring.

caseDefinitionId
string | null

Restrict to tasks that belong to a case definition with the given id.

caseDefinitionKey
string | null

Restrict to tasks that belong to a case definition with the given key.

caseDefinitionName
string | null

Restrict to tasks that belong to a case definition with the given name.

caseDefinitionNameLike
string | null

Restrict to tasks that have a case definition name that has the parameter value as a substring.

caseExecutionId
string | null

Restrict to tasks that belong to a case execution with the given id.

activityInstanceIdIn
string[] | null

Only include tasks which belong to one of the passed and comma-separated activity instance ids.

tenantIdIn
string[] | null

Only include tasks which belong to one of the passed and comma-separated tenant ids.

withoutTenantId
boolean | null
default:false

Only include tasks which belong to no tenant. Value may only be true, as false is the default behavior.

assignee
string | null

Restrict to tasks that the given user is assigned to.

assigneeExpression
string | null

Restrict to tasks that the user described by the given expression is assigned to. See the user guide for more information on available functions.

assigneeLike
string | null

Restrict to tasks that have an assignee that has the parameter value as a substring.

assigneeLikeExpression
string | null

Restrict to tasks that have an assignee that has the parameter value described by the given expression as a substring. See the user guide for more information on available functions.

assigneeIn
string[] | null

Only include tasks which are assigned to one of the passed and comma-separated user ids.

assigneeNotIn
string[] | null

Only include tasks which are not assigned to one of the passed and comma-separated user ids.

owner
string | null

Restrict to tasks that the given user owns.

ownerExpression
string | null

Restrict to tasks that the user described by the given expression owns. See the user guide for more information on available functions.

candidateGroup
string | null

Only include tasks that are offered to the given group.

candidateGroupLike
string | null

Only include tasks that are offered to groups that have the parameter value as a substring.

candidateGroupExpression
string | null

Only include tasks that are offered to the group described by the given expression. See the user guide for more information on available functions.

candidateUser
string | null

Only include tasks that are offered to the given user or to one of his groups.

candidateUserExpression
string | null

Only include tasks that are offered to the user described by the given expression. See the user guide for more information on available functions.

includeAssignedTasks
boolean | null
default:false

Also include tasks that are assigned to users in candidate queries. Default is to only include tasks that are not assigned to any user if you query by candidate user or group(s).

involvedUser
string | null

Only include tasks that the given user is involved in. A user is involved in a task if an identity link exists between task and user (e.g., the user is the assignee).

involvedUserExpression
string | null

Only include tasks that the user described by the given expression is involved in. A user is involved in a task if an identity link exists between task and user (e.g., the user is the assignee). See the user guide for more information on available functions.

assigned
boolean | null
default:false

If set to true, restricts the query to all tasks that are assigned.

unassigned
boolean | null
default:false

If set to true, restricts the query to all tasks that are unassigned.

taskDefinitionKey
string | null

Restrict to tasks that have the given key.

taskDefinitionKeyIn
string[] | null

Restrict to tasks that have one of the given keys. The keys need to be in a comma-separated list.

taskDefinitionKeyLike
string | null

Restrict to tasks that have a key that has the parameter value as a substring.

name
string | null

Restrict to tasks that have the given name.

nameNotEqual
string | null

Restrict to tasks that do not have the given name.

nameLike
string | null

Restrict to tasks that have a name with the given parameter value as substring.

nameNotLike
string | null

Restrict to tasks that do not have a name with the given parameter value as substring.

description
string | null

Restrict to tasks that have the given description.

descriptionLike
string | null

Restrict to tasks that have a description that has the parameter value as a substring.

priority
integer | null

Restrict to tasks that have the given priority.

maxPriority
integer | null

Restrict to tasks that have a lower or equal priority.

minPriority
integer | null

Restrict to tasks that have a higher or equal priority.

dueDate
string<date-time> | null

Restrict to tasks that are due on the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.546+0200.

dueDateExpression
string | null

Restrict to tasks that are due on the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

dueAfter
string<date-time> | null

Restrict to tasks that are due after the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.435+0200.

dueAfterExpression
string | null

Restrict to tasks that are due after the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

dueBefore
string<date-time> | null

Restrict to tasks that are due before the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.243+0200.

dueBeforeExpression
string | null

Restrict to tasks that are due before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

withoutDueDate
boolean | null
default:false

Only include tasks which have no due date. Value may only be true, as false is the default behavior.

followUpDate
string<date-time> | null

Restrict to tasks that have a followUp date on the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.342+0200.

followUpDateExpression
string | null

Restrict to tasks that have a followUp date on the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

followUpAfter
string<date-time> | null

Restrict to tasks that have a followUp date after the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.542+0200.

followUpAfterExpression
string | null

Restrict to tasks that have a followUp date after the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

followUpBefore
string | null

Restrict to tasks that have a followUp date before the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.234+0200.

followUpBeforeExpression
string | null

Restrict to tasks that have a followUp date before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

followUpBeforeOrNotExistent
string<date-time> | null

Restrict to tasks that have no followUp date or a followUp date before the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.432+0200. The typical use case is to query all active tasks for a user for a given date.

followUpBeforeOrNotExistentExpression
string | null

Restrict to tasks that have no followUp date or a followUp date before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

createdOn
string<date-time> | null

Restrict to tasks that were created on the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.324+0200.

createdOnExpression
string | null

Restrict to tasks that were created on the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

createdAfter
string<date-time> | null

Restrict to tasks that were created after the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.342+0200.

createdAfterExpression
string | null

Restrict to tasks that were created after the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

createdBefore
string<date-time> | null

Restrict to tasks that were created before the given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.332+0200.

createdBeforeExpression
string | null

Restrict to tasks that were created before the date described by the given expression. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

updatedAfter
string<date-time> | null

Restrict to tasks that were updated after the given date. Every action that fires a task update event is considered as updating the task. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.332+0200.

updatedAfterExpression
string | null

Restrict to tasks that were updated after the date described by the given expression. Every action that fires a task update event is considered as updating the task. See the user guide for more information on available functions. The expression must evaluate to a java.util.Date or org.joda.time.DateTime object.

delegationState
enum<string> | null

Restrict to tasks that are in the given delegation state. Valid values are PENDING and RESOLVED.

Available options:
PENDING,
RESOLVED
candidateGroups
string[] | null

Restrict to tasks that are offered to any of the given candidate groups. Takes a comma-separated list of group names, so for example developers,support,sales.

candidateGroupsExpression
string | null

Restrict to tasks that are offered to any of the candidate groups described by the given expression. See the user guide for more information on available functions. The expression must evaluate to java.util.List of Strings.

withCandidateGroups
boolean | null
default:false

Only include tasks which have a candidate group. Value may only be true, as false is the default behavior.

withoutCandidateGroups
boolean | null
default:false

Only include tasks which have no candidate group. Value may only be true, as false is the default behavior.

withCandidateUsers
boolean | null
default:false

Only include tasks which have a candidate user. Value may only be true, as false is the default behavior.

withoutCandidateUsers
boolean | null
default:false

Only include tasks which have no candidate users. Value may only be true, as false is the default behavior.

active
boolean | null
default:false

Only include active tasks. Value may only be true, as false is the default behavior.

suspended
boolean | null
default:false

Only include suspended tasks. Value may only be true, as false is the default behavior.

taskVariables
object[] | null

A JSON array to only include tasks that have variables with certain values. The array consists of JSON objects with three properties name, operator and value. name is the variable name, operator is the comparison operator to be used and value the variable value. value may be of type String, Number or Boolean.

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like. key and value may not contain underscore or comma characters.

processVariables
object[] | null

A JSON array to only include tasks that belong to a process instance with variables with certain values. The array consists of JSON objects with three properties name, operator and value. name is the variable name, operator is the comparison operator to be used and value the variable value. value may be of type String, Number or Boolean.

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like; notLike. key and value may not contain underscore or comma characters.

caseInstanceVariables
object[] | null

A JSON array to only include tasks that belong to a case instance with variables with certain values. The array consists of JSON objects with three properties name, operator and value. name is the variable name, operator is the comparison operator to be used and value the variable value. value may be of type String, Number or Boolean.

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like. key and value may not contain underscore or comma characters.

variableNamesIgnoreCase
boolean | null
default:false

Match all variable names in this query case-insensitively. If set variableName and variablename are treated as equal.

variableValuesIgnoreCase
boolean | null
default:false

Match all variable values in this query case-insensitively. If set variableValue and variablevalue are treated as equal.

parentTaskId
string | null

Restrict query to all tasks that are sub tasks of the given task. Takes a task id.

orQueries
object[] | null

A JSON array of nested task queries with OR semantics. A task matches a nested query if it fulfills at least one of the query's predicates. With multiple nested queries, a task must fulfill at least one predicate of each query (Conjunctive Normal Form).

All task query properties can be used except for: sorting, withCandidateGroups, withoutCandidateGroups, withCandidateUsers, withoutCandidateUsers

See the User guide for more information about OR queries.

sorting
object[] | null

Apply sorting of the result

Response

Request successful.

attachment
boolean | null

Specifies if an attachment exists for the task.

comment
boolean | null

Specifies if an comment exists for the task.

id
string | null

The task id.

name
string | null

The task name.

assignee
string | null

The assignee's id.

owner
string | null

The owner's id.

created
string<date-time> | null

The date the task was created on. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.

lastUpdated
string<date-time> | null

The date the task was last updated. Every action that fires a task update event will update this property. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.

due
string<date-time> | null

The task's due date. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.

followUp
string<date-time> | null

The follow-up date for the task. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.

delegationState
enum<string> | null

The task's delegation state. Possible values are PENDING and RESOLVED.

Available options:
PENDING,
RESOLVED
description
string | null

The task's description.

executionId
string | null

The id of the execution the task belongs to.

parentTaskId
string | null

The id the parent task, if this task is a subtask.

priority
integer | null

The task's priority.

processDefinitionId
string | null

The id of the process definition the task belongs to.

processInstanceId
string | null

The id of the process instance the task belongs to.

caseExecutionId
string | null

The id of the case execution the task belongs to.

caseDefinitionId
string | null

The id of the case definition the task belongs to.

caseInstanceId
string | null

The id of the case instance the task belongs to.

taskDefinitionKey
string | null

The task's key.

suspended
boolean | null

Whether the task belongs to a process instance that is suspended.

formKey
string | null

If not null, the form key for the task.

camundaFormRef
object
tenantId
string | null

If not null, the tenant id of the task.

taskState
string | null

The task's state.