Grafana dahsboard api


So i am trying to make a custom alert if the grafana panel does not have any data.
There are situation when the grafana panel might shown no data points for some reason.

I wanted to know how do we get the api with query directly?
i see framing the query using api response is typicaly confusing.

@Avinash welcome to the :grafana: community!

Grafana alerting is currently available in legacy and grafana 8 alerts, the way they work is a little different. Please share which version of grafana and alerts you’re using. Both types of alerts have handling for a no data condition.

This information is for grafana 8 alerts, but the same docs have information under legacy alerts for earlier releases.

The No Data handling options available are:

No Data Create a new alert DatasourceNoData with the name and UID of the alert rule, and UID of the datasource that returned no data as labels.
Alerting Set alert rule state to Alerting.
Ok. Set alert rule state to Normal.