Skip to main content
Question

Number of datapoints between 2 timestamp without aggregation

  • June 15, 2026
  • 1 reply
  • 27 views

RAMBOURG Pierre
Seasoned ⭐️⭐️

Hi experts,

 

In order to decide whether to use an aggregation strategy (or no aggregation at all), I need to know the number of data points between two timestamps without aggregation (server-side calculation).

 

I’m looking for this code of call :

client.time_series.data.count(external_id=<str>, start=<int | datetime>, end=<int | datetime>) -> int

I'm trying to avoid having to perform a granularity calculation

 

Thanks !

Regards,

Pierre

1 reply

Everton Colling
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img
  • Expert ⭐️⭐️⭐️⭐️
  • June 17, 2026

Hi ​@RAMBOURG Pierre!

Today we dont have a dedicated count() method that returns a single value without specifying granularity, but there are ways to compute it client side. Before recommending anything, could you help me understand:

  • What are you ultimately trying to do with the count? For example, are you deciding between plotting raw vs. aggregated data, sizing a request, or something else?
  • Do you need it to be exact, or would an approximation be enough to make the decision?

The reason I am askins is because fetching a count aggregate costs basically the same as fetching count plus the other aggregates, so if the goal is choosing an aggregation strategy, a "count first, then fetch" flow is often slower than just eagerly fetching what you need in parallel and discarding the rest.