Skip to main content
POST
/
history
/
process-instance
/
count
Get List Count (POST)
curl --request POST \
  --url http://{host}:{port}/{contextPath}/history/process-instance/count \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "finishedAfter": "2013-01-01T00:00:00.000+0200",
  "finishedBefore": "2013-04-01T23:59:59.000+0200",
  "executedActivityAfter": "2013-03-23T13:42:44.000+0200",
  "variables": [
    {
      "name": "myVariable",
      "operator": "eq",
      "value": "camunda"
    },
    {
      "name": "mySecondVariable",
      "operator": "neq",
      "value": 124
    }
  ]
}'
{
  "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 process instance query which defines a group of historic process instances

processInstanceId
string | null

Filter by process instance id.

processInstanceIds
string[] | null

Filter by process instance ids. Must be a JSON array of Strings.

processDefinitionId
string | null

Filter by the process definition the instances run on.

processDefinitionKey
string | null

Filter by the key of the process definition the instances run on.

processDefinitionKeyIn
string[] | null

Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Must be a JSON array of Strings.

processDefinitionName
string | null

Filter by the name of the process definition the instances run on.

processDefinitionNameLike
string | null

Filter by process definition names that the parameter is a substring of.

processDefinitionKeyNotIn
string[] | null

Exclude instances that belong to a set of process definitions. Must be a JSON array of Strings.

processInstanceBusinessKey
string | null

Filter by process instance business key.

processInstanceBusinessKeyIn
string[] | null

Filter by a list of business keys. A process instance must have one of the given business keys. Must be a JSON array of Strings

processInstanceBusinessKeyLike
string | null

Filter by process instance business key that the parameter is a substring of.

rootProcessInstances
boolean | null

Restrict the query to all process instances that are top level process instances.

finished
boolean | null

Only include finished process instances. This flag includes all process instances that are completed or terminated. Value may only be true, as false is the default behavior.

unfinished
boolean | null

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

withIncidents
boolean | null

Only include process instances which have an incident. Value may only be true, as false is the default behavior.

withRootIncidents
boolean | null

Only include process instances which have a root incident. Value may only be true, as false is the default behavior.

incidentIdIn
string[] | null

Restrict to instances that have an incident with one of the given ids. Must be a JSON array of Strings

incidentType
string | null

Filter by the incident type. See the User Guide for a list of incident types.

incidentStatus
enum<string> | null

Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents.

Available options:
open,
resolved
incidentMessage
string | null

Filter by the incident message. Exact match.

incidentMessageLike
string | null

Filter by the incident message that the parameter is a substring of.

startedBefore
string<date-time> | null

Restrict to instances 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 instances 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 instances 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 instances 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.

executedActivityAfter
string<date-time> | null

Restrict to instances that executed an activity after the given date (inclusive). 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.

executedActivityBefore
string<date-time> | null

Restrict to instances that executed an activity before the given date (inclusive). 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.

executedJobAfter
string<date-time> | null

Restrict to instances that executed an job after the given date (inclusive). 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.

executedJobBefore
string<date-time> | null

Restrict to instances that executed an job before the given date (inclusive). 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.

startedBy
string | null

Only include process instances that were started by the given user.

superProcessInstanceId
string | null

Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id.

subProcessInstanceId
string | null

Restrict query to one process instance that has a sub process instance with the given id.

superCaseInstanceId
string | null

Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id.

subCaseInstanceId
string | null

Restrict query to one process instance that has a sub case instance with the given id.

caseInstanceId
string | null

Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id.

tenantIdIn
string[] | null

Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Must be a JSON array of Strings

withoutTenantId
boolean | null

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

activityIdIn
string[] | null

Restrict to instances with an active activity with one of the given ids. In contrast to the activeActivityIdIn filter, it can query for async and incident activities. Must be a JSON array of Strings

executedActivityIdIn
string[] | null

Restrict to instances that executed an activity with one of given ids. Must be a JSON array of Strings

activeActivityIdIn
string[] | null

Restrict to instances that have an active activity with one of given ids. Must be a JSON array of Strings

active
boolean | null

Restrict to instances that are active.

suspended
boolean | null

Restrict to instances that are suspended.

completed
boolean | null

Restrict to instances that are completed.

externallyTerminated
boolean | null

Restrict to instances that are externallyTerminated.

internallyTerminated
boolean | null

Restrict to instances that are internallyTerminated.

variables
object[] | null

A JSON array to only include process instances that have/had variables with certain values. The array consists of objects with the three properties name, operator and value. name (String) is the variable name, operator (String) is the comparison operator to be used and value the variable value.

Value may be 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.

variableNamesIgnoreCase
boolean | null

Match all variable names provided in variables case-insensitively. If set to true variableName and variablename are treated as equal.

variableValuesIgnoreCase
boolean | null

Match all variable values provided in variables case-insensitively. If set to true variableValue and variablevalue are treated as equal.

orQueries
object[] | null

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

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

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

All process instance query properties can be used except for: sorting

See the User Guide for more information about OR queries.

sorting
object[] | null

Apply sorting of the result

Response

Request successful.

count
integer

The number of matching instances.