Skip to main content
POST
/
history
/
variable-instance
Get Variable Instances (POST)
curl --request POST \
  --url http://{host}:{port}/{contextPath}/history/variable-instance \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "variableName": "someVariable",
  "variableValue": 42,
  "sorting": [
    {
      "sortBy": "variableName",
      "sortOrder": "asc"
    },
    {
      "sortBy": "instanceId",
      "sortOrder": "desc"
    }
  ]
}'
[
  {
    "id": "someId",
    "name": "someVariable",
    "type": "Integer",
    "variableType": "integer",
    "value": 5,
    "valueInfo": {},
    "processDefinitionKey": "aProcessDefinitionKey",
    "processDefinitionId": "aProcessDefinitionId",
    "processInstanceId": "aProcInstId",
    "executionId": "aExecutionId",
    "activityInstanceId": "aActivityInstId",
    "caseDefinitionKey": null,
    "caseDefinitionId": null,
    "caseInstanceId": null,
    "caseExecutionId": null,
    "taskId": null,
    "tenantId": null,
    "errorMessage": null,
    "state": "CREATED",
    "createTime": "2017-02-10T14:33:19.000+0200",
    "removalTime": "2018-02-10T14:33:19.000+0200",
    "rootProcessInstanceId": "aRootProcessInstanceId"
  }
]

Authorizations

Authorization
string
header
required

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

Query Parameters

firstResult
integer

Pagination of results. Specifies the index of the first result to return.

maxResults
integer

Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

deserializeValues
boolean

Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default true).

If set to true, a serializable variable will be deserialized on server side and transformed to JSON using Jackson's POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath.

If set to false, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML.

Note: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false when developing web applications that are independent of the Java process applications deployed to the engine.

Body

application/json

A Historic Variable Instance instance query which defines a list of Historic Variable Instance instances

variableName
string | null

Filter by variable name.

variableNameLike
string | null

Restrict to variables with a name like the parameter.

variableValue
object

Filter by variable value. May be String, Number or Boolean.

variableNamesIgnoreCase
boolean | null

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

variableValuesIgnoreCase
boolean | null

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

variableTypeIn
string[] | null

Only include historic variable instances which belong to one of the passed and comma- separated variable types. A list of all supported variable types can be found here. Note: All non-primitive variables are associated with the type 'serializable'.

includeDeleted
boolean | null

Include variables that has already been deleted during the execution.

processInstanceId
string | null

Filter by the process instance the variable belongs to.

processInstanceIdIn
string[] | null

Only include historic variable instances which belong to one of the passed process instance ids.

processDefinitionId
string | null

Filter by the process definition the variable belongs to.

processDefinitionKey
string | null

Filter by a key of the process definition the variable belongs to.

executionIdIn
string[] | null

Only include historic variable instances which belong to one of the passed and execution ids.

caseInstanceId
string | null

Filter by the case instance the variable belongs to.

caseExecutionIdIn
string[] | null

Only include historic variable instances which belong to one of the passed and case execution ids.

caseActivityIdIn
string[] | null

Only include historic variable instances which belong to one of the passed and case activity ids.

taskIdIn
string[] | null

Only include historic variable instances which belong to one of the passed and task ids.

activityInstanceIdIn
string[] | null

Only include historic variable instances which belong to one of the passed and activity instance ids.

tenantIdIn
string[] | null

Only include historic variable instances which belong to one of the passed and comma- separated tenant ids.

withoutTenantId
boolean | null

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

variableNameIn
string[] | null

Only include historic variable instances which belong to one of the passed variable names.

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.

id
string | null

The id of the variable instance.

name
string | null

The name of the variable instance.

processDefinitionKey
string | null

The key of the process definition the variable instance belongs to.

processDefinitionId
string | null

The id of the process definition the variable instance belongs to.

processInstanceId
string | null

The process instance id the variable instance belongs to.

executionId
string | null

The execution id the variable instance belongs to.

activityInstanceId
string | null

The id of the activity instance in which the variable is valid.

caseDefinitionKey
string | null

The key of the case definition the variable instance belongs to.

caseDefinitionId
string | null

The id of the case definition the variable instance belongs to.

caseInstanceId
string | null

The case instance id the variable instance belongs to.

caseExecutionId
string | null

The case execution id the variable instance belongs to.

taskId
string | null

The id of the task the variable instance belongs to.

tenantId
string | null

The id of the tenant that this variable instance belongs to.

errorMessage
string | null

An error message in case a Java Serialized Object could not be de-serialized.

state
string | null

The current state of the variable. Can be 'CREATED' or 'DELETED'.

createTime
string<date-time> | null

The time the variable was inserted. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.

removalTime
string<date-time> | null

The time after which the variable should be removed by the History Cleanup job. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.

rootProcessInstanceId
string | null

The process instance id of the root process instance that initiated the process containing this variable.

value
any

Can be any value - string, number, boolean, array or object. Note: Not every endpoint supports every type.

type
string | null

The value type of the variable.

valueInfo
object

A JSON object containing additional, value-type-dependent properties. For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.

For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.

The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See documentation for more informations. (Not applicable for decision-definition, /process-instance/variables-async, and /migration/executeAsync endpoints)