0

Does anybody know if there is a way to get a paginated list of the Alert Rules via the Grafana API. Specifically for Grafana versions 7.5.17 and 9.3.X

I found this endpoint for the version 9.3

/api/ruler/grafana/api/v1/rules

But this API marked as unstable and there is no pagination. Pagination is very important in my case. Maybe there is another way to get the Alert rules?

  • I don't believe paging is available. Also, new Alerting API marked `unstable` as a whole. You could use [old version of api](https://grafana.com/docs/grafana/v7.5/http_api/alerting/#get-alerts) on both instances - for 7.5 it would be current version ;) – markalex Apr 04 '23 at 11:32

1 Answers1

0

You can get the alert rules using this endpoint, in JSON format.GET /api/v1/provisioning/alert-rules

starball
  • 20,030
  • 7
  • 43
  • 238
worrum
  • 90
  • 1
  • 13
  • This endpoint returns "message": "Not found". On the Grafana forum they said that the Provisioning API is available only since version 9.4 – Ewen Field Apr 04 '23 at 11:38