Alerts - Get History
Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).
GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history?api-version=2023-07-12-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
alert
|
path | True |
string |
Unique ID of an alert instance. |
scope
|
path | True |
string |
scope here is resourceId for which alert is created. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. Returns the history of the specified alert. |
|
Other Status Codes |
Error response describing why the operation failed. |
Examples
Resolve
Sample Request
GET https://management.azure.com/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history?api-version=2023-07-12-preview
Sample Response
{
"properties": {
"alertId": "66114d64-d9d9-478b-95c9-b789d6502100",
"modifications": [
{
"modificationEvent": "StateChange",
"oldValue": "New",
"newValue": "Acknowledged",
"modifiedAt": "2018-06-13T06:14:15.7378737Z",
"modifiedBy": "vikramm@microsoft.com",
"comments": "Acknowledging alert",
"description": "State changed from 'New' to 'Acknowledged'"
},
{
"modificationEvent": "AlertCreated",
"oldValue": "",
"newValue": "",
"modifiedAt": "2018-06-13T06:09:01Z",
"modifiedBy": "System",
"comments": "",
"description": "New Alert Object is created"
}
]
},
"id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default",
"type": "Microsoft.AlertsManagement/alerts",
"name": "CPU Alert"
}
Definitions
Name | Description |
---|---|
alert |
Alert Modification details |
Alert |
Reason for the modification |
alert |
Alert modification item. |
alert |
Properties of the alert modification item. |
error |
An error response from the service. |
error |
Details of error response. |
alertModification
Alert Modification details
Name | Type | Description |
---|---|---|
id |
string |
Azure resource Id |
name |
string |
Azure resource name |
properties |
Properties of the alert modification item. |
|
type |
string |
Azure resource type |
AlertModificationEvent
Reason for the modification
Name | Type | Description |
---|---|---|
ActionRuleSuppressed |
string |
|
ActionRuleTriggered |
string |
|
ActionsFailed |
string |
|
ActionsSuppressed |
string |
|
ActionsTriggered |
string |
|
AlertCreated |
string |
|
MonitorConditionChange |
string |
|
SeverityChange |
string |
|
StateChange |
string |
alertModificationItem
Alert modification item.
Name | Type | Description |
---|---|---|
comments |
string |
Modification comments |
description |
string |
Description of the modification |
modificationEvent |
Reason for the modification |
|
modifiedAt |
string |
Modified date and time |
modifiedBy |
string |
Modified user details (Principal client name) |
newValue |
string |
New value |
oldValue |
string |
Old value |
alertModificationProperties
Properties of the alert modification item.
Name | Type | Description |
---|---|---|
alertId |
string |
Unique Id of the alert for which the history is being retrieved |
modifications |
Modification details |
errorResponse
An error response from the service.
Name | Type | Description |
---|---|---|
error |
Details of error response. |
errorResponseBody
Details of error response.
Name | Type | Description |
---|---|---|
code |
string |
Error code, intended to be consumed programmatically. |
details |
A list of additional details about the error. |
|
message |
string |
Description of the error, intended for display in user interface. |
target |
string |
Target of the particular error, for example name of the property. |