Using powershell to create an alert in OpsGenie via the API, and I keep getting "The remote server returned an error: (422) Unprocessable Entity"
This only happens when I attempt to use the tags or responders fields in the body. If I leave those out, I can successfully create alerts. What am I doing wrong with the formatting??
$body = {
message = "MESSAGE TITLE HERE"
description = "DESCRIPTION HERE"
priority = "P5"
alias = "XXXXXXX"
tags = "tag"
responders = {
name = "TEAMNAMEHERE"
type = "team"
}
} | ConvertTo-JsonIf I remove the tags and responders fields, this works perfectly.