Get Incidents
Queries for incidents that fulfill given parameters. The size of the result set can be retrieved by using the Get Incident 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. See the User Guide for a list of incident types. |
| incidentMessage | Restricts to incidents that have the given incident message. |
| incidentMessageLike | Restricts to incidents that incidents message is a substring of the given value. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%). |
| processDefinitionId | Restricts to incidents that belong to a process definition with the given id. |
| processDefinitionKeyIn | Restricts to incidents that belong to a process definition with the given keys. Must be a comma-separated list. |
| 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. |
| incidentTimestampBefore | Restricts to incidents that have an incidentTimestamp 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. |
| incidentTimestampAfter | Restricts to incidents that have an incidentTimestamp 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. |
| activityId | Restricts to incidents that belong to an activity with the given id. |
| failedActivityId | Restricts to incidents that were created due to the failure of 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. |
| sortBy | Sort the results lexicographically by a given criterion. Valid values are
incidentId, incidentMessage, incidentTimestamp, incidentType, executionId, activityId, processInstanceId, processDefinitionId, causeIncidentId, rootCauseIncidentId, configuration and tenantId.
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. |
| firstResult | Pagination of results. Specifies the index of the first result to return. |
| maxResults | Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. |
Result
A JSON array of incident objects. Each incident object has the following properties:
| Name | Type | 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. 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. |
| failedActivityId | String | The id of the activity on which the last exception occurred. |
| 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. |
| tenantId | String | The id of the tenant this incident is associated with. |
| incidentMessage | String | The message of this incident. |
| jobDefinitionId | String | The job definition id the incident is associated with. |
| annotation | String | The annotation set to the 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 /incident?processInstanceId=aProcInstId
Response
[
{
"id": "anIncidentId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anExecutionId",
"incidentTimestamp": "2014-03-01T08:00:00.000+0200",
"incidentType": "failedJob",
"activityId": "serviceTask",
"failedActivityId": "serviceTask",
"causeIncidentId": "aCauseIncidentId",
"rootCauseIncidentId": "aRootCauseIncidentId",
"configuration": "aConfiguration",
"tenantId": null,
"incidentMessage": "anIncidentMessage",
"jobDefinitionId": "aJobDefinitionId",
"annotation": "an annotation"
},
{
"id": "anIncidentId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anotherExecutionId",
"incidentTimestamp": "2014-03-01T09:00:00.000+0200",
"incidentType": "customIncidentType",
"activityId": "userTask",
"failedActivityId": "userTask",
"causeIncidentId": "anotherCauseIncidentId",
"rootCauseIncidentId": "anotherRootCauseIncidentId",
"configuration": "anotherConfiguration",
"tenantId": null,
"incidentMessage": "anotherIncidentMessage",
"jobDefinitionId": null,
"annotation": "another annotation"
}
]