Get Cleanable Case Instance Report

Retrieves a report about a case definition and finished case 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 case instances, cleanable case instances and basic case definition data - id, key, name and version. The size of the result set can be retrieved by using the Get Cleanable Case Instance Report Count method.

Method

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

Parameters

Query Parameters

Name Description
caseDefinitionIdIn Filter by case definition ids. Must be a comma-separated list of case definition ids.
caseDefinitionKeyIn Filter by case definition keys. Must be a comma-separated list of case definition keys.
tenantIdIn Filter by a comma-separated list of tenant ids. A case definition must have one of the given tenant ids.
withoutTenantId Only include case definitions which belong to no tenant. Value may only be true, as false is the default behavior.
compact Only include case 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 case instance information relevant to history cleanup. Each report result has the following properties:

Name Value Description
caseDefinitionId String The id of the case definition.
caseDefinitionKey String The key of the case definition.
caseDefinitionName String The name of the case definition.
caseDefinitionVersion Number The version of the case definition.
historyTimeToLive Number The history time to live of the case definition.
finishedCaseInstanceCount Number The count of the finished historic case instances.
cleanableCaseInstanceCount Number The count of the cleanable historic case instances, referring to history time to live.
tenantId String The tenant id of the case 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/case-definition/cleanable-case-instance-report

Response

[
  {
    "caseDefinitionId":"invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
    "caseDefinitionKey":"invoice",
    "caseDefinitionName":"Invoice Receipt",
    "caseDefinitionVersion":1,
    "historyTimeToLive":5,
    "finishedCaseInstanceCount":100,
    "cleanableCaseInstanceCount":53,
    "tenantId":"aTenantId"
  },
  {
    "caseDefinitionId":"invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
    "caseDefinitionKey":"invoice",
    "caseDefinitionName":"Invoice Receipt v2.0",
    "caseDefinitionVersion":2,
    "historyTimeToLive":5,
    "finishedCaseInstanceCount":1000,
    "cleanableCaseInstanceCount":13,
    "tenantId":"aTenantId"
  }

]

目录: