goalert
goalert copied to clipboard
Acknowledge alert API endpoint
Hello, everyone!
What problem would you like to solve? Please describe: I have found out that graphql is used in GoAlert, especially to acknowledge alert in web UI. I am developing my own monitoring system based on goalert and I did not find any solutions to acknowledge alert without web UI.
Describe the solution you'd like: I would like to acknowledge alerts using, for example, REST API and API token.
Describe alternatives you've considered:
-
Additional context: At the moment, I can do this using /api/graphql endpoint and json I attach below.
{
"operationName": "UpdateAlertsMutation",
"query": "mutation UpdateAlertsMutation($input: UpdateAlertsInput!) {\n updateAlerts(input: $input) {\n id\n __typename\n }\n}",
"variables": {
"input": {
"alertIDs": [
"1227"
],
"newStatus": "StatusAcknowledged"
}
}
}
curl 'https://<goalert_url>/api/graphql' -H "Content-Type: application/json" -H "Cookie: $COOKIE" -d @payload.json
It works but this operation requires my cookie from a browser. Also, I did not find any opportunities to create an API token in goalert. Is it possible to develop such feature?
We are currently working on this: https://github.com/target/goalert/issues/3007
It's in the nightly build under an experimental flag, though that should be wrapped up in the next week or so; and it will be in the next release.
@mastercactapus great! Nice news! I am looking forward to try this feature!
@mastercactapus Hello! Are there any updates?
@mastercactapus what is the status on this issue?