Alert Rules filter by DashboardUID

https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json

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

Takes 2 query parameters:

DashboardUID - string
PanelID - number
curl --location --request GET 'localhost:3000/api/ruler/grafana/api/v1/rules?DashboardUID=test' \
--header 'Content-Type: application/json'

My expectation is that the above query should give me all alert rules with the dashboardUID test but it gives me all alert rules for all dashboards. The Grafana version that I am using is v9.3.0 docker. Is there something that I am doing wrong or is it a bug in the version I’m using?

welcome to the :grafana: community @sonnytu01

thanks for bringing this to our attention

I have reproduced the same behaviour

please create a new issue in our github repo, and reference this post, so our engineers can take a look into the issue. Thank you!