You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm writing a tool called grafana-interacter and I need to be able to query silences with pagination (so, be able to specify limit/offset via query params) and only get a slice of silences and ideally some metadata like limit/offset.
From the OpenAPI docs https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml#L61 it doesn't seem like it's possible, so it would be lovely if the silences endpoint can provide this.
Something like this would be ideal, but also API breaking (query params won't be breaking, but changing the response format would):
# Query: either this
GET /api/v2/silences?page=0&per_page=50
# or this
GET /api/v2/silences?limit=50&offset=0
# and the response
{
silences: [], // array
meta: {
total: 95, // the total amount of silences
}
}
What did you expect to see?
What did you see instead? Under which circumstances?
Environment
System information:
insert output of uname -srm here
Alertmanager version:
insert output of alertmanager --version here (repeat for each alertmanager
version in your cluster, if relevant to the issue)
Prometheus version:
insert output of prometheus --version here (repeat for each prometheus
version in your cluster, if relevant to the issue)
Alertmanager configuration file:
insert configuration here
Prometheus configuration file:
insert configuration here (if relevant to the issue)
Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
The text was updated successfully, but these errors were encountered:
Pagination is a much needed feature, but as mentioned, it is a breaking change that will affect existing clients. I suspect it we will have to release another API (APIv3) with pagination support as updating APIv2 will be too disruptive.
What did you do?
So I'm writing a tool called grafana-interacter and I need to be able to query silences with pagination (so, be able to specify limit/offset via query params) and only get a slice of silences and ideally some metadata like limit/offset.
From the OpenAPI docs https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml#L61 it doesn't seem like it's possible, so it would be lovely if the silences endpoint can provide this.
Something like this would be ideal, but also API breaking (query params won't be breaking, but changing the response format would):
What did you expect to see?
What did you see instead? Under which circumstances?
Environment
System information:
insert output of
uname -srm
hereAlertmanager version:
insert output of
alertmanager --version
here (repeat for each alertmanagerversion in your cluster, if relevant to the issue)
Prometheus version:
insert output of
prometheus --version
here (repeat for each prometheusversion in your cluster, if relevant to the issue)
Alertmanager configuration file:
The text was updated successfully, but these errors were encountered: