curl --request GET \
--url http://{host}:{port}/{contextPath}/history/variable-instance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/variable-instance"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/history/variable-instance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/history/variable-instance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/history/variable-instance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/history/variable-instance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/variable-instance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"id": "someId",
"name": "my_variable",
"type": "String",
"value": "my_value",
"valueInfo": {},
"processDefinitionKey": "aVariableInstanceProcDefKey",
"processDefinitionId": "aVariableInstanceProcDefId",
"processInstanceId": "aVariableInstanceProcInstId",
"executionId": "aVariableInstanceExecutionId",
"activityInstanceId": "aVariableInstanceActivityInstId",
"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"
}
]获取列表
Queries for historic variable instances that fulfill the given parameters. The size of the result set can be retrieved by using the Get Variable Instance Count method.
curl --request GET \
--url http://{host}:{port}/{contextPath}/history/variable-instance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/variable-instance"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/history/variable-instance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/history/variable-instance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/history/variable-instance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/history/variable-instance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/variable-instance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"id": "someId",
"name": "my_variable",
"type": "String",
"value": "my_value",
"valueInfo": {},
"processDefinitionKey": "aVariableInstanceProcDefKey",
"processDefinitionId": "aVariableInstanceProcDefId",
"processInstanceId": "aVariableInstanceProcInstId",
"executionId": "aVariableInstanceExecutionId",
"activityInstanceId": "aVariableInstanceActivityInstId",
"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
Query Parameters
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'.
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.
Response
Request successful.
The time the variable was inserted. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time after which the variable should be removed by the History Cleanup job.
Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
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 fordecision-definition,/process-instance/variables-async, and/migration/executeAsyncendpoints)