Should the total field report the total number of stream records within the date/time range I provided in the original query?
I guess I’m not totally clear on exactly how I should be using the pagination to request all the records within this date/time range. I would assume that I should be calculating the number of pages to request (and therefore the number of page requests to make via the API) based on the total number of records reported.
What’s the correct way to get all the records for a time/date range if the total number of records exceeds the max 100 records per request?
The total value is a legacy field, and to preserve the existing public API, we continue returning it with the value always set to zero. That said, page and perPage need to be included in the request body to handle pagination. In your case, you can set perPage to 100 and keep incrementing the page value until the response returns fewer than 100 items.
Just to close the loop on this for anybody running across this in the future: I ended up abandoning the Grafana Infinity plugin because it can’t handle the pagination required by the Golioth API.
Instead, I’m just using Golioth pipelines to route the data into an InfluxDB database, and visualizing it in Grafana using the InfluxDB data source. This post on the blog describes how to set it all up.