Hi All,
I have a requirement where I need to determine if a particular panel has data using an HTTP API request. Here’s the scenario:
- Panel Query Setup:
- The backend query for the panel uses multiple global variables.
- I can provide the value of the main variable as input, but the remaining variables are dependent on the value of the main variable or other variables.
- Challenges:
- I need to find and resolve the values of all the dependent variables dynamically.
- Once I have the resolved query with all the variables substituted, I need to execute it (using an HTTP API) to check if the query returns data.
- Questions:
- How can I programmatically fetch the values of all the dependent variables from Grafana using the HTTP API?
- If I pass the main variables in an HTTP request, is it possible to get the panel JSON file with the variables replaced by their resolved values?
- What’s the best way to execute the panel query with resolved variables via the API to check if data exists?
Any suggestions, best practices, or examples for handling this use case would be greatly appreciated.
Thanks in advance for your help!