Skip to main content
POST
/
timeseries
/
aggregate
JavaScript SDK
const aggregates = await client.timeseries.aggregate({ filter: { isString: true } });
console.log('Number of string timeseries: ', aggregates[0].count)
{
  "items": [
    {
      "count": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

application/json

Aggregates the time series that match the given criteria.

advancedFilter
and · object

A query that matches items matching boolean combinations of other queries. It is built by nesting one or more Boolean clauses, each of which is one of and, or, and not. Each such clause contains one or more child clauses (though not can only have one). Each child clause can be either another Boolean clause or a leaf filter.

Example:
{
"or": [
{
"not": {
"and": [
{
"equals": {
"property": ["metadata", "manufacturer"],
"value": "acme"
}
},
{
"in": {
"property": ["name"],
"values": ["pump-1-temperature", "motor-9-temperature"]
}
},
{
"range": {
"property": ["dataSetId"],
"gte": 1,
"lt": 10
}
}
]
}
},
{
"and": [
{
"equals": { "property": ["assetId"], "value": 1234 }
},
{
"equals": {
"property": ["description"],
"value": "Temperature in Celsius"
}
}
]
}
]
}
filter
object
aggregateFilter
and · object

A query that matches items matching boolean combinations of other queries. It's built by nesting one or more Boolean clauses, each of which is one of and, or, and not. Each such clause contains one or more child clauses (though not can only have one). Each child clause can be either another Boolean clause or a leaf filter.

aggregate
enum<string>

The count aggregation gets the number of time series that match the filter(s). This is the default aggregation, which will also be applied if aggregate is not specified.

Available options:
count

Response

Response with the aggregated time series. The type of the response depends on the value of the aggregate parameter in the request.

items
object[]
required
Required array length: 1 element
Last modified on April 23, 2026