I've made a successful API call using the integration key to create alert. It is possible to close the alert using the user api key?
With this command
curl -X POST https://api.opsgenie.com/v2/alerts/xxxxxxxxxxxxxxxxxxxxxxx/close?identifierType=id
-H "Authorization: GenieKey xxxxxxUserApiKeyxxxxxxxx"
-H "Content-Type: application/json"
-d '{ "user":"Monitoring Script", "source":"AWS Lambda", "note":"Action executed via Alert API" }'
Then returns the error:
"code": 40301,
"message": "To perform this action, use an API key from an API integration."
Create alert by this command
curl -X POST https://api.opsgenie.com/v2/alerts -H "Content-Type: application/json" -H "Authorization: GenieKey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d '{
"message": "Test alert",
"alias": "Life is too short for no alias",
"description": "Every alert needs a description",
"responders": [
{
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"type": "team"
}
],
"entity": "An example entity",
"priority": "P4"
}'