Get Incidents

Queries for historic incidents that fulfill given parameters. The size of the result set can be retrieved by using the Get Incident Count method.

Method

GET /history/incident

Parameters

Query Parameters

Name Description
incidentId Restricts to incidents that have the given id.
incidentType Restricts to incidents that belong to the given incident type. See the User Guide for a list of incident types.
incidentMessage Restricts to incidents that have the given incident message.
processDefinitionId Restricts to incidents that belong to a process definition with the given id.
processInstanceId Restricts to incidents that belong to a process instance with the given id.
executionId Restricts to incidents that belong to an execution with the given id.
activityId Restricts to incidents that belong to an activity with the given id.
causeIncidentId Restricts to incidents that have the given incident id as cause incident.
rootCauseIncidentId Restricts to incidents that have the given incident id as root cause incident.
configuration Restricts to incidents that have the given parameter set as configuration.
tenantIdIn Restricts to incidents that have one of the given comma-separated tenant ids.
jobDefinitionIdIn Restricts to incidents that have one of the given comma-separated job definition ids.
open Restricts to incidents that are open.
deleted Restricts to incidents that are deleted.
resolved Restricts to incidents that are resolved.
sortBy Sort the results lexicographically by a given criterion. Valid values are incidentId, incidentMessage, createTime, endTime, incidentType, executionId, activityId, processInstanceId, processDefinitionId, causeIncidentId, rootCauseIncidentId, configuration, tenantId and incidentState. Must be used in conjunction with the sortOrder parameter.
sortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.

Result

A JSON array of historic incident objects. Each historic incident object has the following properties:

Name Value Description
id String The id of the incident.
processDefinitionKey String The key of the process definition this incident is associated with.
processDefinitionId String The id of the process definition this incident is associated with.
processInstanceId String The key of the process definition this incident is associated with.
executionId String The id of the execution this incident is associated with.
createTime String The time this incident happened. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
endTime String The time this incident has been deleted or resolved. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
incidentType String 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 for a list of incident types.
activityId String The id of the activity this incident is associated with.
causeIncidentId String The id of the associated cause incident which has been triggered.
rootCauseIncidentId String The id of the associated root cause incident which has been triggered.
configuration String The payload of this incident.
incidentMessage String The message of this incident.
tenantId String The id of the tenant this incident is associated with.
jobDefinitionId String The job definition id the incident is associated with.
open Boolean If true, this incident is open.
deleted Boolean If true, this incident has been deleted.
resolved Boolean If true, this incident has been resolved.
removalTime String The time after which the incident should be removed by the History Cleanup job. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
rootProcessInstanceId String The process instance id of the root process instance that initiated the process containing this incident.

* For further information, please see the documentation.

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 sortOrder parameter is supplied, but no sortBy. See the Introduction for the error response format.

Example

Request

GET /history/incident?processInstanceId=aProcInstId

Response

[
  {
    "id": "anIncidentId",
    "processDefinitionId": "aProcDefId",
    "processInstanceId": "aProcInstId",
    "executionId": "anExecutionId",
    "createTime": "2014-03-01T08:00:00.000+0200",
    "endTime": null,
    "incidentType": "failedJob",
    "activityId": "serviceTask",
    "causeIncidentId": "aCauseIncidentId",
    "rootCauseIncidentId": "aRootCauseIncidentId",
    "configuration": "aConfiguration",
    "incidentMessage": "anIncidentMessage",
    "tenantId": null,
    "jobDefinitionId": "aJobDefinitionId",
    "open": true,
    "deleted": false,
    "resolved": false,
    "removalTime": null,
    "rootProcessInstanceId": "aRootProcessInstanceId"
  },
  {
    "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",
    "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"
  }
]

On this Page: