The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Really excited about Grafana alerts! Trying to use the /api/alerts-notifications listed here
What Grafana version are you using?
Grafana v4.2.0 (commit: 349f3eb) (plus searched master)
What OS are you running grafana on?
Docker image
What did you do?
curl -H 'Content-Type: application/json' -ksvX GET 'http://admin:admin@localhost:3000/api/alerts-notifications'
What was the expected result?
[] / 200 OK
What happened instead?
404 {"message":"Not found"}
It appears to be referenced in the docs, but the route not actually set up, based on quick grep. But also these endpoints functionality could already be implemented (e.g. alerting.go: func GetAlertNotifications)
$ find . -type f | xargs grep '/api/alerts'
./docs/sources/http_api/alerting.md:`GET /api/alerts/`
./docs/sources/http_api/alerting.md: GET /api/alerts HTTP/1.1
./docs/sources/http_api/alerting.md:`GET /api/alerts/:id`
./docs/sources/http_api/alerting.md: GET /api/alerts/1 HTTP/1.1
./docs/sources/http_api/alerting.md:`POST /api/alerts/:id/pause`
./docs/sources/http_api/alerting.md: POST /api/alerts/1/pause HTTP/1.1
./docs/sources/http_api/alerting.md:`POST /api/alerts-notifications`
./docs/sources/http_api/alerting.md: POST /api/alerts-notifications HTTP/1.1
./docs/sources/http_api/alerting.md:`PUT /api/alerts-notifications/1`
./docs/sources/http_api/alerting.md: PUT /api/alerts-notifications/1 HTTP/1.1
./docs/sources/http_api/alerting.md:`DELETE /api/alerts-notifications/:notificationId`
./docs/sources/http_api/alerting.md: DELETE /api/alerts-notifications/1 HTTP/1.1
./pkg/api/alerting.go:// GET /api/alerts
./pkg/api/alerting.go:// POST /api/alerts/test
./pkg/api/alerting.go:// GET /api/alerts/:id
./pkg/api/alerting.go:// DEL /api/alerts/:id
./pkg/api/alerting.go://POST /api/alerts/:alertId/pause
./public/app/features/alerting/alert_list_ctrl.ts: this.backendSrv.get('/api/alerts', this.filters).then(result => {
./public/app/features/alerting/alert_list_ctrl.ts: this.backendSrv.post(`/api/alerts/${alert.id}/pause`, payload).then(result => {
./public/app/features/alerting/alert_tab_ctrl.ts: return this.backendSrv.post('/api/alerts/test', payload).then(res => {
./public/app/features/annotations/annotations_srv.ts: this.alertStatesPromise = this.backendSrv.get('/api/alerts/states-for-dashboard', {dashboardId: options.dashboard.id});
./public/app/plugins/panel/alertlist/module.ts: this.backendSrv.get(`/api/alerts`, params)
Really excited about Grafana alerts! Trying to use the
/api/alerts-notifications
listed herecurl -H 'Content-Type: application/json' -ksvX GET 'http://admin:admin@localhost:3000/api/alerts-notifications'
[]
/200 OK
404 {"message":"Not found"}
It appears to be referenced in the docs, but the route not actually set up, based on quick grep. But also these endpoints functionality could already be implemented (e.g.
alerting.go: func GetAlertNotifications
)