Workflow Statistic REST API 📊
We want to provide statistical data over workflow data and provide them in Axon Ivy Portal as charts 📈. We decided to index the workflow data in Elasticsearch and provide aggregations via a REST Endpoint.
Buckets & Metrics
We are now in the world buckets & metrics. You can group your data for example by state
and you get for each state a bucket with the count of tasks for this bucket. You can make sub-aggregations. Which means you can group by startTimeStamp
and then by state
. Then you will get buckets in buckets.
We also provide metrics like SUM, AVG, MIN and MAX. You can make a single metric aggregation e.g. customfield.string.lending:max
or you can combine it with buckets.
REST Endpoints
/{app}/api/workflow/tasks/stats
You can now run bucket and metric aggregations:
/{app}/api/workflow/tasks/stats?agg=startTimeStamp,state
or
/{app}/api/workflow/tasks/stats?agg=startTimeStamp:max
The pattern is:
?agg={field}:{operation}:{payload},{field2}:{operation2}:{payload2},{fieldX}:{operationX}:{payloadX}
Mobile Workflow API
I've started to renovate the existing mobile workflow API endpoint. We no longer use the term mobile there and see it more as general endpoint provided by Axon Ivy.
https://developer.axonivy.com/api-browser?configUrl=https://developer.axonivy.com/doc/11.1/openapi/config.json&urls.primaryName=workflow#/
Let's evolve the existing workflow APIs and make it even better.
Audience: Workflow Admins
Value: Workflow Overview
Version: 11.1.0
Discussion
Next steps
- Improve REST endpoint capability in general
- Enrich REST API with more task properties
- Add a case stats endpoint
Screenshots / Code
By calling this URL:

You can make charts like that:
