Get Process Instance Duration Report

Retrieves a report about the duration of completed process instances grouped by a period. These reports include the maximum, minimum and average duration of all completed process instances, which have been started in a period.

Note: This does include only historic data.

Method

GET /history/process-instance/report?reportType=duration

Parameters

Query Parameters

Name Description
reportType Mandatory. Specifies the kind of the report to execute. In order to retrieve a report about the duration of process instances the value must be set to duration.
periodUnit Mandatory. Specifies the granularity of the report. Valid values are month and quarter.
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.
startedBefore Restrict to instances that were started before the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2016-01-23T14:42:45.
startedAfter Restrict to instances that were started after the given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss, e.g., 2016-01-23T14:42:45.

Result

A JSON array of duration report result objects. Each object has the following properties:

Name Value Description
period Number Specifies a span of time within a year.
Note: The period must be interpreted in conjunction with the returned periodUnit.
periodUnit String The unit of the given period. Possible values are MONTH and QUARTER.
maximum Number The greatest duration in milliseconds of all completed process instances, which have been started in the given period.
minimum Number The smallest duration in milliseconds of all completed process instances, which have been started in the given period.
average Number The average duration in milliseconds of all completed process instances, which have been started in the given period.

Response Codes

Code Media type Description
200 application/json Request successful.
200 application/csv or text/csv Request successful. In case of an expected application/csv or text/csv response to retrieve the result as a csv file.
400 application/json Returned if some of the query parameters are invalid or mandatory parameters are not supplied. See the Introduction for the error response format.
403 application/json If the authenticated user is unauthorized to read the history. See the Introduction for the error response format.

Example

Request

GET /history/process-instance/report?reportType=duration&periodUnit=quarter&processDefinitionKeyIn=invoice

Response

[
  {
    "period": 1,
    "periodUnit": "QUARTER",
    "maximum": 500000,
    "minimum": 250000,
    "average": 375000
  },
  {
    "period": 2,
    "periodUnit": "QUARTER",
    "maximum": 600000,
    "minimum": 300000,
    "average": 450000
  },
  {
    "period": 3,
    "periodUnit": "QUARTER",
    "maximum": 1000000,
    "minimum": 500000,
    "average": 750000
  },
  {
    "period": 4,
    "periodUnit": "QUARTER",
    "maximum": 200000,
    "minimum": 100000,
    "average": 150000
  }
]

On this Page: