Get Case Instance Count
Queries for the number of case instances that fulfill given parameters. Takes the same parameters as the Get Case Instances method.
Method
GET /case-instance/count
Parameters
Query Parameters
Name | Description |
---|---|
caseInstanceId | Filter by a case instance id. |
businessKey | Filter by case instance business key. |
caseDefinitionId | Filter by the case definition the case instances run on. |
caseDefinitionKey | Filter by the key of the case definition the case instances run on. |
deploymentId | Filter by the deployment the id belongs to. |
superProcessInstance | Restrict query to all case instances that are sub case instances of the given process instance. Takes a process instance id. |
subProcessInstance | Restrict query to all case instances that have the given process instance as a sub process instance. Takes a process instance id. |
superCaseInstance | Restrict query to all case instances that are sub case instances of the given case instance. Takes a case instance id. |
subCaseInstance | Restrict query to all case instances that have the given case instance as a sub case instance. Takes a case instance 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. |
tenantIdIn | Filter by a comma-separated list of tenant ids. A case instance must have one of the given tenant ids. |
withoutTenantId | Only include case instances which belong to no tenant. Value may only be true , as false is the default behavior. |
variables | Only include case 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 .key and value may not contain underscore or comma characters.
|
variableNamesIgnoreCase | Match all variable names provided in variables case-insensitively. If set to true variableName and variablename are treated as equal. |
variableValuesIgnoreCase | Match all variable values provided in variables case-insensitively. If set to true variableValue and variablevalue are treated as equal. |
Result
A JSON object that contains the count as the only property.
Name | Type | Description |
---|---|---|
count | Number | The number of matching 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, for example if an invalid operator for variable comparison is used. See the Introduction for the error response format. |
Example
Request
GET /case-instance/count?variables=myVariable_eq_camunda
Response
{
"count": 1
}