Many bulk read endpoints support an optional grouping parameter, using which results can be grouped together on some attribute. Common grouping attributes include:
Collection: Group by the collection of the node represented by an entity in the result set.
Type: Group by the type (vertex or edge) of node represented by an entity in the result set.
Event: Group by the type (created/updated/deleted) of event that the entity in a result set represents.
It is not necessary that all of the above grouping attributes are available for all endpoints. It depends on the core structure of the data requested.
If a grouping attribute is specified, an additional set of sub-parameters can be optionally specified that determine how the entries within a group are arranged. These are:
Group Sort: Sorts entries within a group by a specific attribute. The attribute choice depends on the specific endpoint. See API docs for more details.
Group Slice: Skip and/or limit entries within a group, post group-sort.
Aggregation (Count): Rather than return an entity list within a group, return their count (group-wise totals). If this sub-parameter is specified, the other sub-parameters are ignored.
There is a special case of aggregation, wherein counts are requested, but the grouping attribute is absent. In this case, the API returns the total count of ALL entities, rather than group-wise totals. In this case, the upper level sorting and slicing parameters are ignored.
Grouping clauses are applied within the DB query that is used to fetch intermediate results.