Get Case Instances Count

Query for the number of historic case instances that fulfill the given parameters. Takes the same parameters as the Get Case Instances method.

Method

GET /history/case-instance/count

Parameters

Query Parameters

Name Description
caseInstanceId Filter by case instance id.
caseInstanceIds Filter by case instance ids. Must be a comma-separated list of case instance ids.
caseDefinitionId Filter by the case definition the instances run on.
caseDefinitionKey Filter by the key of the case definition the instances run on.
caseDefinitionKeyNotIn Exclude instances that belong to a set of case definitions. Must be a comma-separated list of case definition keys.
caseDefinitionName Filter by the name of the case definition the instances run on.
caseDefinitionNameLike Filter by case definition names that the parameter is a substring of.
caseInstanceBusinessKey Filter by case instance business key.
caseInstanceBusinessKeyLike Filter by case instance business key that the parameter is a substring of.
createdBefore Restrict to instances that were created before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
createdAfter Restrict to instances that were created after the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
closedBefore Restrict to instances that were closed before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
closedAfter Restrict to instances that were closed after the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2013-01-23T14:42:45.
createdBy Only include case instances that were created by the given user.
superCaseInstanceId Restrict query to all case instances that are sub case instances of the given case instance. Takes a case instance id.
subCaseInstanceId Restrict query to one case instance that has a sub case instance with the given id.
superProcessInstanceId Restrict query to all case instances that are sub case instances of the given process instance. Takes a process instance id.
subProcessInstanceId Restrict query to one case instance that has a sub process instance with the given id.
active Only include active case instances. Value may only be true, as false is the default behavior.
completed Only include completed case instances. Value may only be true, as false is the default behavior.
terminated Only include terminated case instances. Value may only be true, as false is the default behavior.
closed Only include closed case instances. Value may only be true, as false is the default behavior.
notClosed Only include not closed case instances. Value may only be true, as false is the default behavior.
variables Only include process instances that have/had 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.

Result

A JSON object that contains the count as the only property.

Name Value Description
count Number The number of matching historic case instances.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid. See the Introduction for the error response format.

Example

Request

GET /history/case-instance/count?notClose=true

Response

{
  "count": 1
}

On this Page: