I’m using one of the two datasources:
- marcusolsson-json-datasource
- yesoreyeram-infinity-datasource
Both can call HTTP API endpoints.
The problem is the endpoint returns paginated response (JSON)… My panel will be a very simple table that just shows the endpoint’s response to the query (HTTP Request).
What I want to achieve is making Grafana grab the paginated data…
Example: When I click on page 1 it make a request with page_size=X&page_number=1
and so on… Is that possible ?
If not possible… what is the best thing to do here?
Should I use some kind of caching ? What cache suits best with my case and how to implement it?
I’ve been digging but I didn’t really come to something useful.
Can you know ahead of time how many pages are returned or total sum of records?
-
One way is build a comma delimited variable 1 to pageNumbers and provide it as a drop down
-
Build a table visualization that is built with data from the api itself. When you click on it, it updates the other visual via data links
-
Uae telegraf to harvest the data via python? Sounds overkill
1 Like
Thank you a lot for your reply…
- I can make a call to the API to return the number of pages… But, how can I use that returned number as a drop-down selector ??
- Any guide/tutorial on how to implement this ? (I’m sorry, I did search but I couldn’t really find how it can be implemented)
- I’ll search more about pytelegraf and how it can be done.