-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alerting: Add optional metadata via query param to silence GET requests #88000
Conversation
d0473d6
to
4c61016
Compare
4c61016
to
d142d37
Compare
73d9f22
to
5fbbf06
Compare
1a44689
to
483a72a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it works as expected. Just few comments\suggestions in comments and
- I am not sure
create
field makes sense in per-silence access control field. WDYT? - It would be great to update our integration tests. Separate PR is fine, though.
Replaces withMetadata query param with separate: - ruleMetadata: to request rule metadata. - accesscontrol: to request access control metadata. Also modifies access control metadata response to be: `"accessControl": map[string]bool` The above brings it inline with other access control responses.
b613dde
to
b2241e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Really like the direction we're taking!
I checked with my changes from the UI portion and it looks to be working great on my setup 💯 query params/property names are all aligned now, thanks! |
What is this feature?
Adds a query param options
ruleMetadata=true
andaccesscontrol=true
to/alertmanager/grafana/api/v2/silences
andalertmanager/grafana/api/v2/silence/{SilenceId}
ruleMetadata=true
will add a new metadata field containingrule_uid
,rule_title
,folder_uid
for rule-specific silences.accessconntrol=true
will add a top-levelaccessControl
field containing user permissions on each silence (read
/write
/create
)Ex:
Why do we need this feature?
This is needed to: