I asked chatGPT if there is a grafana API for setting the timepicker values in a dashboard, it told me this. Does this API actually exist or did it just make it up?
ChatGPT told me there is a REST API call to set the timepicker current time range in a dashboard. True?
My reaction is that since such a reputable source of information about Grafana
has even given you an example - did you simply try it?
If it works, the oracle was correct.
If not, it may either be talking about another version of Grafana from the one
you’re using, a version which is still in secret development, a version whcih
is no longer supported, a version of something else which is not actually
Grafana, or maybe even something it decided you seemed to want to hear and
therefore it came up with some encouraging (although ultimately disappointing)
Personally I do not know the answer to your question, but if I did want to
know the answer, I would ask here, or at a Grafana training session, if I
wanted to have good confidence about the answer.
10 points for creative research though
There seems to be no documentation on this API call in the grafana docs so I’m a little skeptical …
Just as I was about to spin up chatGPT for grafana related stuff. Thanks for beating me to yhe punch
Gonna see if it can write me a heatmap plugin
No, it doesn’t exist. Doc: Dashboard HTTP API | Grafana documentation
I would ban any ChatGPT answers here as Stackoverflow did: Why posting GPT and ChatGPT generated answers is not currently acceptable - Help Center - Stack Overflow They will very likely generate low quality answers and a lot of noise.
GPT is good enough to convince users that the answer holds merit, but it may not be correct as you see for this particular use case. There is many case where it is not right GitHub - giuven95/chatgpt-failures: Failure archive for ChatGPT and similar models
Similar use case is a new “Bing AI” (production version of ChatGPT) - at least it gives better answer:
Hah, well it sure looked plausible! Maybe I should make a feature request for this API
So, while I’ve got your attention, here is what I’m trying to do:
We have a grafana dashboard page embedded in an iframe in our app, and we would like to be able to have our ‘wrapper’ application force the dashboard in the iframe to go to a specified time interval, as if the user had picked it themselves with the timepicker widget.
Is there a best practice to do this?
Probably best to start a new thread as this question has nothing to do with the subject. Also post as many details as you can re your iFrame code snippet.