curl --request GET \
--url http://{host}:{port}/{contextPath}/history/incident \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/incident"
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/incident', 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/incident",
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/incident"
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/incident")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/incident")
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": "anIncidentId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anExecutionId",
"createTime": "2014-03-01T08:00:00.000+0200",
"endTime": null,
"incidentType": "failedJob",
"activityId": "serviceTask",
"failedActivityId": "serviceTask",
"causeIncidentId": "aCauseIncidentId",
"rootCauseIncidentId": "aRootCauseIncidentId",
"configuration": "aConfiguration",
"incidentMessage": "anIncidentMessage",
"tenantId": null,
"jobDefinitionId": "aJobDefinitionId",
"open": true,
"deleted": false,
"resolved": false,
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"annotation": "an annotation"
},
{
"id": "anIncidentId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anotherExecutionId",
"createTime": "2014-03-01T08:00:00.000+0200",
"endTime": "2014-03-10T12:00:00.000+0200",
"incidentType": "customIncidentType",
"activityId": "userTask",
"failedActivityId": "userTask",
"causeIncidentId": "anotherCauseIncidentId",
"rootCauseIncidentId": "anotherRootCauseIncidentId",
"configuration": "anotherConfiguration",
"incidentMessage": "anotherIncidentMessage",
"tenantId": null,
"jobDefinitionId": null,
"open": false,
"deleted": false,
"resolved": true,
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId",
"annotation": "another annotation"
}
]获取列表
Queries for historic incidents that fulfill given parameters. The size of the result set can be retrieved by using the Get Incident Count method.
curl --request GET \
--url http://{host}:{port}/{contextPath}/history/incident \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/incident"
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/incident', 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/incident",
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/incident"
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/incident")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/incident")
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": "anIncidentId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anExecutionId",
"createTime": "2014-03-01T08:00:00.000+0200",
"endTime": null,
"incidentType": "failedJob",
"activityId": "serviceTask",
"failedActivityId": "serviceTask",
"causeIncidentId": "aCauseIncidentId",
"rootCauseIncidentId": "aRootCauseIncidentId",
"configuration": "aConfiguration",
"incidentMessage": "anIncidentMessage",
"tenantId": null,
"jobDefinitionId": "aJobDefinitionId",
"open": true,
"deleted": false,
"resolved": false,
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"annotation": "an annotation"
},
{
"id": "anIncidentId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anotherExecutionId",
"createTime": "2014-03-01T08:00:00.000+0200",
"endTime": "2014-03-10T12:00:00.000+0200",
"incidentType": "customIncidentType",
"activityId": "userTask",
"failedActivityId": "userTask",
"causeIncidentId": "anotherCauseIncidentId",
"rootCauseIncidentId": "anotherRootCauseIncidentId",
"configuration": "anotherConfiguration",
"incidentMessage": "anotherIncidentMessage",
"tenantId": null,
"jobDefinitionId": null,
"open": false,
"deleted": false,
"resolved": true,
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId",
"annotation": "another annotation"
}
]Authorizations
Query Parameters
Restricts to incidents that belong to the given incident type. See the User Guide for a list of incident types.
Restricts to incidents that have a createTime date 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.
Restricts to incidents that have a createTime date 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.
Restricts to incidents that have an endTimeBefore date 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.
Restricts to incidents that have an endTimeAfter date 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.
Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter.
incidentId, incidentMessage, createTime, endTime, incidentType, executionId, activityId, processInstanceId, processDefinitionId, processDefinitionKey, causeIncidentId, rootCauseIncidentId, configuration, historyConfiguration, tenantId, incidentState Response
Request successful.
The time this incident happened.
Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time this incident has been deleted or resolved.
Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time after which the incident should be removed by the History Cleanup job.
Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The type of incident, for example: failedJobs will be returned in case of an
incident which identified a failed job during the execution of a
process instance. See the [User Guide](/manual/develop/user-
guide/process-engine/incidents/#incident-types) for a list of
incident types.