Get Incidents Count

Query for the number of incidents that fulfill given parameters. Takes the same parameters as the get incidents method.

Method

GET /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.
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 object that contains the count as the only property.

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

Example

Request

GET /incident/count?processInstanceId=aProcInstId

Response

{"count": 2}

On this Page: