I need some advise regarding acknowledging alerts using the API.I have been using this link as reference https://docs.opsgenie.com/docs/alert-api#acknowledge-alert
I am currently using PowerShell to get alerts successfully and then run some action offline.
As part of my post actions, I would like to acknowledge the alert but I'm not having much luck with that. I do suspect I'm doing it wrong. This is what I'm currently using to try and acknowledge the alert:
Hi @Xana ,
I think it might be as simple an incorrect header?
Looks like yours is "ContentType"
While I believe it should be "Content-Type"
https://docs.opsgenie.com/docs/alert-api#acknowledge-alert
That does seem to be the problem.
Thanks
@Nick Haller ,
I am using opsgenie python SDK (opsgenie-sdk==2.1.5) to Acknowledge alert, but I get "Body should be a JSON object" error response.
My function calling acknowledge_alert:
Only difference I find in the APIs is get_alert is GET and acknowledge_alert is POST.
I was able to successfully ACK alerts from API, after passing acknowledge_alert_payload={}. I think this is required as this is POST API and some form of body is required.
It looks like you're new here. Sign in or register to get started.