Get Incident Count
Queries for the number of historic incidents that fulfill the given parameters. Takes the same parameters as the Get Incidents method.
Method
GET /history/incident/count
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. | 
| processInstanceId | Restricts to incidents that belong to a process instance with the given id. | 
| processDefinitionKey | Restricts to incidents that have the given processDefinitionKey. | 
| processDefinitionKeyIn | Restricts to incidents that have one of the given process definition keys. | 
| executionId | Restricts to incidents that belong to an execution with the given id. | 
| createTimeBefore | 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. | 
| createTimeAfter | 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. | 
| endTimeBefore | 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. | 
| endTimeAfter | 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. | 
| 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. | 
| withoutTenantId | Only include historic incidents that belong to no tenant. Value may only be true, asfalseis the default behavior. | 
| 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,createTime,endTime,incidentType,executionId,activityId,processInstanceId,processDefinitionId,processDefinitionKey,causeIncidentId,rootCauseIncidentId,configurationandtenantId.
    Must be used in conjunction with thesortOrderparameter. | 
| sortOrder | Sort the results in a given order. Values may be ascfor ascending order ordescfor descending order.
    Must be used in conjunction with thesortByparameter. | 
Result
A JSON object that contains the count as the only property.
| Name | Type | Description | 
|---|---|---|
| count | Number | The number of matching executions. | 
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 sortOrderparameter is supplied, but nosortBy. See the Introduction for the error response format. | 
Example
Request
GET /history/incident/count?processInstanceId=aProcInstId
Response
{
  "count": 2
}