Get Variable Instance Count
Query for the number of variable instances that fulfill given parameters. Takes the same parameters as the Get Variable Instances method.
Method
GET /variable-instance/count
Parameters
Query Parameters
| Name | Description | 
|---|---|
| variableName | Filter by variable instance name. | 
| variableNameLike | Filter by the variable instance name. The parameter can include the wildcard %to express like-strategy such as: starts with (%name), ends with (name%) or contains (%name%). | 
| processInstanceIdIn | Only include variable instances which belong to one of the passed and comma-separated process instance ids. | 
| executionIdIn | Only include variable instances which belong to one of the passed and comma-separated execution ids. | 
| caseInstanceIdIn | Only include variable instances which belong to one of the passed case instance ids. | 
| caseExecutionIdIn | Only include variable instances which belong to one of the passed case execution ids. | 
| taskIdIn | Only include variable instances which belong to one of the passed and comma-separated task ids. | 
| activityInstanceIdIn | Only include variable instances which belong to one of the passed and comma-separated activity instance ids. | 
| tenantIdIn | Only include variable instances which belong to one of the passed and comma-separated tenant ids. | 
| variableValues | Only include variable instances that have the certain values.
    Value filtering expressions are comma-separated and are structured as follows: A valid parameter value has the form key_operator_value.keyis the variable name,operatoris the comparison operator to be used andvaluethe variable value.Note: Values are always treated as Stringobjects 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.keyandvaluemay not contain underscore or comma characters. | 
| sortBy | Sort the results lexicographically by a given criterion. Valid values are variableName,variableType,activityInstanceIdandtenantId.
    Must be used in conjunction with thesortOrderparameter. | 
| sortOrder | Sort the results in a given order. Values may be ascfor ascending order ordescfor descending order.
    Must be used in conjunction with thesortByparameter. | 
| firstResult | Pagination of results. Specifies the index of the first result to return. | 
| maxResults | Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. | 
Result
A JSON object that contains the count as the only property.
| Name | Value | Description | 
|---|---|---|
| count | Number | The number of matching variable 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 a sortOrderparameter is supplied, but nosortBy, or if an invalid operator for variable comparison is used. See the Introduction for the error response format. | 
Example
Request
GET /variable-instance/count?processInstanceIdIn=aProcessInstanceId,anotherProcessInstanceId&variableValues=amount_gteq_5,amount_lteq_200
Response
{"count": 3}