|
|
|
[[Queries]] [[Query-Search-Options]]
|
|
|
|
|
|
|
|
# TOC
|
|
|
|
|
|
|
|
[TOC]
|
|
|
|
|
|
|
|
# Instance State
|
|
|
|
|
|
|
|
Count the number of instances per state in an entity. This will only work if there is a state/workflow defined
|
|
|
|
on an entity.
|
|
|
|
|
|
|
|
Example for extensions.query:
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
#/data/extensions/query/query
|
|
|
|
{
|
|
|
|
"join" : "instance_state",
|
|
|
|
"group_by" : "instance_state.name",
|
|
|
|
"select" : ["instance_state.name",{"count":"me.id"}],
|
|
|
|
"as" : ["name" ,"count"]
|
|
|
|
}
|
|
|
|
``` |
|
|
|
\ No newline at end of file |