My expectation would be that the from field would be changed to current date getting the values of ‘from’ from the date interval on the date picker (it’s showing Last 1 hour)
Hi @grant2 I need to use an api that gives me data for an interval that has to be in one of this two formats:
startdate=20241209&enddate=20241210 (so I’d need the day to be now+1d)
startdate=20241209 00:00:00&enddate=20241209 23:59:59 (staying on the same day)
At the end I went for the first method because you can’t get easily the format I needed (colons don’t work in this plugin, see here)
So the final logic is this one (using the __timeFrom and __timeTo will make use of the panel range dates (documentation) startdate=${__timeFrom:date:YYYYMMDD}&enddate=${__timeTo:date:YYYYMMDD}
Some info that helped me was here and the final bit of information here
Yes, the last part has been to get a static time window in the future, I had to set the relative time to the future and the time shift to some value (1h in this case).
URLs with date ranges different from a Grafana dashboard can be created through API requests or custom queries. For example, you can pass date ranges as parameters in the URL to fetch data from Grafana, like start={start_date}&end={end_date}. Additionally, services may generate static URLs for specific date ranges, such as https://yourservice.com/report?from=2023-01-01&to=2023-12-31. This approach allows for retrieving data outside the typical Grafana time picker, by directly embedding the date range in the URL.