Get Cleanable Process Instance Report

Retrieves a report about a process definition and finished process instances relevant to history cleanup (see History cleanup) so that you can tune the history time to live. These reports include the count of the finished historic process instances, cleanable process instances and basic process definition data - id, key, name and version. The size of the result set can be retrieved by using the Get Cleanable Process Instance Report Count method.

Method

GET /history/process-definition/cleanable-process-instance-report

Parameters

Query Parameters

Name Description
processDefinitionIdIn Filter by process definition ids. Must be a comma-separated list of process definition ids.
processDefinitionKeyIn Filter by process definition keys. Must be a comma-separated list of process definition keys.
tenantIdIn Filter by a comma-separated list of tenant ids. A process definition must have one of the given tenant ids.
withoutTenantId Only include process definitions which belong to no tenant. Value may only be true, as false is the default behavior.
compact Only include process instances which have more than zero finished instances. Value may only be true, as false is the default behavior.
sortBy Sort the results by a given criterion. Valid value is finished. 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 containing finished process instance information relevant to history cleanup. Each report result has the following properties:

Name Type Description
processDefinitionId String The id of the process definition.
processDefinitionKey String The key of the process definition.
processDefinitionName String The name of the process definition.
processDefinitionVersion Number The version of the process definition.
historyTimeToLive Number The history time to live of the process definition.
finishedProcessInstanceCount Number The count of the finished historic process instances.
cleanableProcessInstanceCount Number The count of the cleanable historic process instances, referring to history time to live.
tenantId String The tenant id of the process definition.

Response Codes

Code Media type Description
200 application/json Request successful.
500 application/json See the Introduction for the error response format.

Examples

Request

GET /history/process-definition/cleanable-process-instance-report

Response

[
  {
    "processDefinitionId":"invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
    "processDefinitionKey":"invoice",
    "processDefinitionName":"Invoice Receipt",
    "processDefinitionVersion":1,
    "historyTimeToLive":5,
    "finishedProcessInstanceCount":100,
    "cleanableProcessInstanceCount":53,
    "tenantId":"aTenantId"
  },
  {
    "processDefinitionId":"invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
    "processDefinitionKey":"invoice",
    "processDefinitionName":"Invoice Receipt v2.0",
    "processDefinitionVersion":2,
    "historyTimeToLive":5,
    "finishedProcessInstanceCount":1000,
    "cleanableProcessInstanceCount":13,
    "tenantId":"aTenantId"
  }
]

On this Page: