Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API - Get Time-series point limit #10751

Open
Crinst opened this issue May 9, 2024 · 3 comments
Open

REST API - Get Time-series point limit #10751

Crinst opened this issue May 9, 2024 · 3 comments
Assignees
Labels
question generic question

Comments

@Crinst
Copy link

Crinst commented May 9, 2024

Hello,

we are running TB PE v3.6.2 and we would like to show time-series data in graphs to user in our mobile application. But we have noticed that REST API request "getTimeseries" in telemetry-controller always returns only 100 points. Is there any configuration or possible way how to increase amount of points returned in single request?

We need to show graph from past year (12 months per approx. 30 days/month) == approx. 365 points per API requests (ideal use-case).
We could do 12 requests for every month, but this slows down whole "loading" phase of application.

Thank you for your help

@Crinst Crinst added the question generic question label May 9, 2024
@ashaforost
Copy link
Contributor

Hi @Crinst

If you don't set the limit on the number of timeseries retrieved in the API call, it defaults to 100 records. You can set a higher limit with &limit=400 URL parameter.

@ashaforost ashaforost assigned ashaforost and unassigned Ultrazombie May 9, 2024
@Crinst
Copy link
Author

Crinst commented May 9, 2024

Thank you,. It indeed worked. I though it was not relevant to this as it stated it was "available" only for aggregation function "None", but it seems to work for AVG as well or at least It did not throw error for fetching data with ts range of several days and many thousands of datapoints.
Anyway thank you for your help.
image

@Crinst Crinst closed this as completed May 9, 2024
@Crinst
Copy link
Author

Crinst commented May 10, 2024

One more question, if I enter start-stop TS + interval_time, then set higher limit (to lets say 400). Is 'agg' parameter used or does it simply return value associated with specific timestamp (start_timestamp+interval_time).
Based on the information, with custom 'limit', the 'agg' function is not used. But REST API does not throw any error if I set 'agg' function other than 'NONE'.

@Crinst Crinst reopened this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question generic question
Projects
None yet
Development

No branches or pull requests

3 participants