Skip to main content
POST
/
history
/
task
/
count
Get Task Count (POST)
curl --request POST \
  --url http://{host}:{port}/{contextPath}/history/task/count \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "taskVariables": [
    {
      "name": "varName",
      "value": "varValue",
      "operator": "eq"
    },
    {
      "name": "anotherVarName",
      "value": 30,
      "operator": "neq"
    }
  ],
  "priority": 10
}'
{
  "count": 1
}

Authorizations

Authorization
string
header
required

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

Body

application/json

A Historic Task instance query which defines a list of Historic Task instances

taskId
string | null

Filter by task id.

taskParentTaskId
string | null

Filter by parent task id.

processInstanceId
string | null

Filter by process instance id.

rootProcessInstanceId
string | null

Filter by root process instance id.

processInstanceBusinessKey
string | null

Filter by process instance business key.

processInstanceBusinessKeyIn
string[] | null

Filter by process instances with one of the give business keys. The keys need to be in a comma-separated list.

processInstanceBusinessKeyLike
string | null

Filter by process instance business key that has the parameter value as a substring.

executionId
string | null

Filter by the id of the execution that executed the task.

processDefinitionId
string | null

Filter by process definition id.

processDefinitionKey
string | null

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

processDefinitionName
string | null

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

caseInstanceId
string | null

Filter by case instance id.

caseExecutionId
string | null

Filter by the id of the case execution that executed the task.

caseDefinitionId
string | null

Filter by case definition 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.

activityInstanceIdIn
string[] | null

Only include tasks which belong to one of the passed activity instance ids.

taskName
string | null

Restrict to tasks that have the given name.

taskNameLike
string | null

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

taskDescription
string | null

Restrict to tasks that have the given description.

taskDescriptionLike
string | null

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

taskDefinitionKey
string | null

Restrict to tasks that have the given key.

taskDefinitionKeyIn
string[] | null

Restrict to tasks that have one of the passed task definition keys.

taskDeleteReason
string | null

Restrict to tasks that have the given delete reason.

taskDeleteReasonLike
string | null

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

taskAssignee
string | null

Restrict to tasks that the given user is assigned to.

taskAssigneeLike
string | null

Restrict to tasks that are assigned to users with the parameter value as a substring.

taskOwner
string | null

Restrict to tasks that the given user owns.

taskOwnerLike
string | null

Restrict to tasks that are owned by users with the parameter value as a substring.

taskPriority
integer | null

Restrict to tasks that have the given priority.

assigned
boolean | null

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

unassigned
boolean | null

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

finished
boolean | null

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

unfinished
boolean | null

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

processFinished
boolean | null

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

processUnfinished
boolean | null

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

taskDueDate
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.000+0200.

taskDueDateBefore
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.000+0200.

taskDueDateAfter
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.000+0200.

withoutTaskDueDate
boolean | null

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

taskFollowUpDate
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.000+0200.

taskFollowUpDateBefore
string<date-time> | 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.000+0200.

taskFollowUpDateAfter
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.000+0200.

startedBefore
string<date-time> | null

Restrict to tasks that were started 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.000+0200.

startedAfter
string<date-time> | null

Restrict to tasks that were started 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.000+0200.

finishedBefore
string<date-time> | null

Restrict to tasks that were finished 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.000+0200.

finishedAfter
string<date-time> | null

Restrict to tasks that were finished 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.000+0200.

tenantIdIn
string[] | null

Filter by a list of tenant ids. A task instance must have one of the given tenant ids.

withoutTenantId
boolean | null

Only include historic task instances that belong to no tenant. Value may only be true, as false is the default behavior.

taskVariables
object[] | null

Only include tasks that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:

A valid parameter value has the form key_operator_value. key is the variable name, operator is the comparison operator to be used and value the variable value. Note: Values are always treated as String objects on server side.

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

Only include tasks that belong to process instances that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:

A valid parameter value has the form key_operator_value. key is the variable name, operator is the comparison operator to be used and value the variable value. Note: Values are always treated as String objects on server side.

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.

variableNamesIgnoreCase
boolean | null

Match the variable name provided in taskVariables and processVariables case- insensitively. If set to true variableName and variablename are treated as equal.

variableValuesIgnoreCase
boolean | null

Match the variable value provided in taskVariables and processVariables case- insensitively. If set to true variableValue and variablevalue are treated as equal.

taskInvolvedUser
string | null

Restrict to tasks with a historic identity link to the given user.

taskInvolvedGroup
string | null

Restrict to tasks with a historic identity link to the given group.

taskHadCandidateUser
string | null

Restrict to tasks with a historic identity link to the given candidate user.

taskHadCandidateGroup
string | null

Restrict to tasks with a historic identity link to the given candidate group.

withCandidateGroups
boolean | null

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

withoutCandidateGroups
boolean | null

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

orQueries
object[] | null

A JSON array of nested historic task instance queries with OR semantics.

A task instance matches a nested query if it fulfills at least one of the query's predicates.

With multiple nested queries, a task instance must fulfill at least one predicate of each query (Conjunctive Normal Form).

All task instance query properties can be used except for: sorting, withCandidateGroups, withoutCandidateGroups.

See the User Guide for more information about OR queries.

sorting
object[] | null

An array of criteria to sort the result by. Each element of the array is an object that specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc. Sorting has no effect for count endpoints

Response

Request successful.

count
integer

The number of matching instances.