Grafana rest API

I am using this (http://grafana.staged-by-discourse.com/api/annotations?limit=2000&&type=alert) endpoint to fetch
alert history, but here the alert name and Data fields are empty,can anyone tell me why? and how can I send data to those fields? I tried multiple things to send the hostname in the description too but it’s not working. Used these templates below. please help.(Grafana Version-9.0 OSS)

{{ $values.B0.labels.host}}
{{ .Labels.alertname }}
{{ .CommonLabels.alertname }}
{{ $values.B0.Value }}

{
“alertId”: 31,
“alertName”: “”,
“dashboardId”: 4,
“dashboardUID”: “6kqBvcG4z”,
“panelId”: 2,
“userId”: 0,
“newState”: “Alerting”,
“prevState”: “Pending”,
“created”: 1663774571928,
“updated”: 1663774571928,
“time”: 1663774568561,
“timeEnd”: 1663774568561,
“text”: “Influx Uptime {alertname=Influx Uptime} - Alerting”,
“tags”: ,
“login”: “”,
“email”: “”,
“avatarUrl”: “”,
“data”: {}
}

just checking: are you using this api spec?

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

Thanks for the reply, @mattabrams
I’m not sure, my objective is to show all the alert history with alert name in a table. I found the solution on this link stackoverflow

The panel should look something like this with the Proper Alert Name and if possible hostname.