Hi,
I create opsgene azure alerts by api requests like this.
https://api.opsgenie.com/v1/json/azure?apiKey=xxxxxxxApiKeyxxxxxxxxx
{
"schemaId": "azureMonitorCommonAlertSchema",
"data": {
"essentials": {
"alertRule": "StorageCheck high message ",
"severity": "Sev3",
"signalType": "Metric",
"monitorCondition": "Fired",
"monitoringService": "Platform",
"firedDateTime": "2020-06-29T18:41:05.7016722Z",
"description": "Test Description",
"essentialsVersion": "1.0",
"alertContextVersion": "1.0"
},
"alertContext": {
"properties": null,
"conditionType": "SingleResourceMultipleMetricCriteria",
"condition": {
"windowSize": "PT1M",
"allOf": [{
"metricName": "SuccessfulRequests",
"metricNamespace": "Microsoft.EventHub/namespaces",
"operator": "GreaterThan",
"threshold": "2",
"timeAggregation": "Total",
"dimensions": [{
"name": "EntityName",
"value": "test-eventhub"
}, {
"name": "OperationResult",
"value": "Success"
}],
"metricValue": 4.0,
"webTestName": null
}],
"windowStartTime": "2020-06-29T18:38:52.06Z",
"windowEndTime": "2020-06-29T18:39:52.06Z"
}
}
}
}
And i want to get alert id by get request.
I tried use this request:
https://api.opsgenie.com/v2/alerts/requests/xxxxxxxRequestsIDxxxxxxxxx
Authorization: GenieKey xxxxxxxApiKeyxxxxxxxxx
Content-Type: application/json
Body {}
But its return me 403 error The request could not be satisfied.
If request without body its return me message "Request not found. It might not be processed, yet."
I tried another request:
https://api.opsgenie.com/v1/json/azure/alerts/requests/xxxxxxxRequestsIDxxxxxxxxx?apiKey=xxxxxxxApiKeyxxxxxxxxx
Content-Type: application/json
Body {}
But its return me 403 error The request could not be satisfied.
What the correct way to get azure alert id by request id?