Get Incidents

Query for incidents that fulfill given parameters. The size of the result set can be retrieved by using the get incidents count method.

Method

GET /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.
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.
sortBy Sort the results lexicographically by a given criterion. Valid values are incidentId, incidentTimestamp, incidentType, executionId, activityId, processInstanceId, processDefinitionId, causeIncidentId, rootCauseIncidentId and configuration. 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 incident objects. Each incident object has the following properties:

Name Value Description
id String The id of the incident.
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.
incidentTimestamp String The time this incident happened. Has the format yyyy-MM-dd'T'HH:mm:ss.
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.
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.

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 /incident?processInstanceId=aProcInstId

Response

[
  {
    "id": "anIncidentId",
    "processDefinitionId": "aProcDefId",
    "processInstanceId": "aProcInstId",
    "executionId": "anExecutionId",
    "incidentTimestamp": "2014-03-01T08:00:00",
    "incidentType": "failedJob",
    "activityId": "serviceTask",
    "causeIncidentId": "aCauseIncidentId",
    "rootCauseIncidentId": "aRootCauseIncidentId",
    "configuration": "aConfiguration",
    "incidentMessage": "anIncidentMessage"
  },
  {
    "id": "anIncidentId",
    "processDefinitionId": "aProcDefId",
    "processInstanceId": "aProcInstId",
    "executionId": "anotherExecutionId",
    "incidentTimestamp": "2014-03-01T09:00:00",
    "incidentType": "customIncidentType",
    "activityId": "userTask",
    "causeIncidentId": "anotherCauseIncidentId",
    "rootCauseIncidentId": "anotherRootCauseIncidentId",
    "configuration": "anotherConfiguration",
    "incidentMessage": "anotherIncidentMessage"
  }
]

On this Page: