The aggregation API lets you compute aggregated results on documents, such as getting the count of all documents in a project, checking different authors of documents in a project and the count of documents in each of those aggregations. By specifying an additional filter or search, you can aggregate only among documents matching the specified filter or search. When you don’t specify theDocumentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
aggregate field in the request body, the default behavior is to return the count of all matched documents.
Supported aggregates
count
count
Count of documents matching the specified filters and search.
cardinalityValues
cardinalityValues
Returns an approximate count of distinct values for the specified properties.
cardinalityProperties
cardinalityProperties
Returns an approximate count of distinct properties for a given property path. Currently only implemented for the
["sourceFile", "metadata"] path.uniqueValues
uniqueValues
Returns top unique values for specified properties (up to the requested limit) and the count of each in the property specified in
properties. The list will have the highest count first.uniqueProperties
uniqueProperties
Returns top unique properties values for specified properties (up to the requested limit) and the count of each in the property specified in
properties. The list will have the highest count first.Currently, the uniqueProperties aggregate is only supported for property ["sourceFile", "metadata"].Aggregate filtering
Only some aggregate types currently support
aggregateFilter.