Aggregate data across nodes/edges
Required capabilities:
dataModelsAcl:READ
Aggregate data for nodes or edges in a project. You can use an optional query or filter specification to limit the result.
Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Body
Aggregation specification.
Defines an aggregation request. This will let you group, and aggregate supported data types. The request supports filters, and allows optional search matching.
Reference to a view
Optional query string. The API will parse the query string, and use it to match the text properties on elements to use for the aggregate(s).
Optional list (array) of properties you want to apply the query above to. If you do not list any properties, you search through text fields by default.
1 - 200 elementsLimit the number of results returned. The default limit is currently at 100 items.
1 <= x <= 10005Calculates the average from the data stored by the specified property. This aggregation uses an average mean calculation, and not an integral mean.
- avg
- count
- min
- max
- sum
- histogram
The selection of fields to group the results by when doing aggregations. You can specify up to 5 items to group by.
When you do not specify any aggregates, the fields listed in the groupBy clause will return the unique
values stored for each field. The property types supported for groupBy are text, direct, int32, int64, float32, float64, boolean, and enum.
1 - 5 elementsBuild a new query by combining other queries, using boolean operators. We support the and, or, and
not boolean operators.
- and
- or
- not
- equals
- in
- range
- prefix
- exists
- containsAny
- containsAll
- matchAll
- nested
- overlaps
- hasData
- instanceReferences
{
"and": [
{
"in": {
"property": ["tag"],
"values": [10011, 10011]
}
},
{
"range": { "property": ["weight"], "gte": 0 }
}
]
}Controls how multiple search terms are combined when matching documents.
-
OR (default): A document matches if it contains any of the query terms in the searchable fields. This typically returns more results but with lower precision.
-
AND: A document matches only if it contains all of the query terms across the searchable fields. This typically returns fewer results but with higher relevance.
AND, OR The type of instance
node, edge Properties to convert to another unit. The API can only convert to another unit, if a unit has been defined as part of the type on the underlying container being queried.
1 - 10 elementsShould we return property type information as part of the result?