Real time data is not available via the API. I'm doing something similar to you but for historical metrics via Prometheus and I went with a timespan of 900s (15 minutes) that I have noticed is the minimum that always give me a reply as I have noticed that using a timespan of 12/13 minutes or lower almost always replies with all 0. For live monitoring the only way to go is the Dashboard, but for historical metrics I think that the average over 15 minutes could be good enough.
... View more