Get Historic Activity Instance Count (POST)
Queries for the number of historic activity instances that fulfill the given parameters.
Method
POST /history/activity-instance/count
Parameters
Request Body
A JSON object with the following properties:
| Name | Description |
|---|---|
| activityInstanceId | Filter by activity instance id. |
| processInstanceId | Filter by process instance id. |
| processDefinitionId | Filter by process definition id. |
| executionId | Filter by the id of the execution that executed the activity instance. |
| activityId | Filter by the activity id (according to BPMN 2.0 XML). |
| activityName | Filter by the activity name (according to BPMN 2.0 XML). |
| activityType | Filter by activity type. |
| taskAssignee | Only include activity instances that are user tasks and assigned to a given user. |
| finished | Only include finished activity instances. Value may only be true, as false behaves the same as when the property is not set. |
| unfinished | Only include unfinished activity instances. Value may only be true, as false
behaves the same as when the property is not set. |
| canceled | Only include canceled activity instances. Value may only be true, as false behaves
the same as when the property is not set. |
| completeScope | Only include activity instances which completed a scope. Value may only be true, as false
behaves the same as when the property is not set. |
| startedBefore | Restrict to instances that were started 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. |
| startedAfter | Restrict to instances that were started 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. |
| finishedBefore | Restrict to instances that were finished 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. |
| finishedAfter | Restrict to instances that were finished 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. |
| tenantIdIn | Filter by a list of tenant ids. An activity instance must have one of the given tenant ids. Must be a JSON array of Strings. |
| withoutTenantId | Only include historic activity instances that belong to no tenant. Value may only be
true, as false is the default behavior. |
* For further information, please see the documentation.
Result
A JSON object that contains the count as the only property.
| Name | Value | Description |
|---|---|---|
| count | Number | The number of matching historic activity instances. |
Response Codes
| Code | Media type | Description |
|---|---|---|
| 200 | application/json | Request successful. |
| 400 | application/json | Returned if some of the query parameters are invalid. See the Introduction for the error response format. |
Example
Request
POST /history/activity-instance/count
Request Body:
{
"activityType": "userTask"
}
Response
{
"count": 1
}