curl --request GET \
--url http://{host}:{port}/{contextPath}/history/process-instance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/process-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/process-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/process-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/process-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/process-instance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/process-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": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e",
"businessKey": null,
"processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
"processDefinitionKey": "invoice",
"processDefinitionName": "Invoice Receipt",
"processDefinitionVersion": 1,
"startTime": "2017-02-10T14:33:19.000+0200",
"endTime": null,
"removalTime": null,
"durationInMillis": null,
"startUserId": null,
"startActivityId": "StartEvent_1",
"deleteReason": null,
"rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6",
"superProcessInstanceId": null,
"superCaseInstanceId": null,
"caseInstanceId": null,
"tenantId": null,
"state": "ACTIVE",
"restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003"
}
]获取列表
Queries for historic process instances that fulfill the given parameters. The size of the result set can be retrieved by using the Get Process Instance Count method.
curl --request GET \
--url http://{host}:{port}/{contextPath}/history/process-instance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/process-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/process-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/process-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/process-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/process-instance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/process-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": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e",
"businessKey": null,
"processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
"processDefinitionKey": "invoice",
"processDefinitionName": "Invoice Receipt",
"processDefinitionVersion": 1,
"startTime": "2017-02-10T14:33:19.000+0200",
"endTime": null,
"removalTime": null,
"durationInMillis": null,
"startUserId": null,
"startActivityId": "StartEvent_1",
"deleteReason": null,
"rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6",
"superProcessInstanceId": null,
"superCaseInstanceId": null,
"caseInstanceId": null,
"tenantId": null,
"state": "ACTIVE",
"restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003"
}
]Authorizations
Query Parameters
Filter by the incident type. See the User Guide for a list of incident types.
Restrict to instances that were started before the given date.
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that were started after the given date.
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that were finished before the given date.
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that were finished after the given date.
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that executed an activity after the given date (inclusive).
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that executed an activity before the given date (inclusive).
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that executed an job after the given date (inclusive).
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to instances that executed an job before the given date (inclusive).
By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
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.
Response
Request successful.
The time the instance was started. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time the instance ended. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time after which the instance should be removed by the History Cleanup job. Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Last state of the process instance, possible values are:
ACTIVE - running process instance
SUSPENDED - suspended process instances
COMPLETED - completed through normal end event
EXTERNALLY_TERMINATED - terminated externally, for instance through REST API
INTERNALLY_TERMINATED - terminated internally, for instance by terminating boundary event
ACTIVE, SUSPENDED, COMPLETED, EXTERNALLY_TERMINATED, INTERNALLY_TERMINATED