Alerts - Change State Tenant
Change the state of an alert.
POST https://management.azure.com/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate?api-version=2025-05-25-preview&newState={newState}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
alert
|
path | True |
string |
Unique ID of an alert instance. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
new
|
query | True |
New state of the alert. |
Request Body
| Name | Type | Description |
|---|---|---|
| comments |
string |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Resolve
Sample request
Sample response
{
"name": "cpu alert",
"type": "Microsoft.AlertsManagement/alerts",
"id": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100",
"properties": {
"context": {},
"egressConfig": {},
"essentials": {
"description": "description of the alert",
"actionStatus": {
"isSuppressed": false
},
"alertRule": "https://servisdfsdfappinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=",
"alertState": "Acknowledged",
"lastModifiedDateTime": "2018-09-13T15:51:02Z",
"lastModifiedUserName": "System",
"monitorCondition": "Fired",
"monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z",
"monitorService": "Application Insights",
"severity": "Sev3",
"signalType": "Log",
"smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56",
"smartGroupingReason": "Occurred frequently with other alerts",
"sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49",
"startDateTime": "2018-09-13T15:51:02Z",
"targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight",
"targetResourceGroup": "servicedeskresourcegroup",
"targetResourceName": "servicedeskappinsight",
"targetResourceType": "components"
}
}
}
Definitions
| Name | Description |
|---|---|
|
Action |
Action status |
| Alert |
An alert created in alert management service. |
|
Alert |
Alert property bag |
|
Alerts |
An error response from the service. |
|
Alert |
|
| Comments |
Change alert state reason |
|
Error |
Details of error response. |
| Essentials |
This object contains consistent fields across different monitor services. |
|
Monitor |
|
|
Monitor |
|
| Severity | |
|
Signal |
The type of signal the alert is based on, which could be metrics, logs or activity logs. |
ActionStatus
Action status
| Name | Type | Description |
|---|---|---|
| isSuppressed |
boolean |
Value indicating whether alert is suppressed. |
Alert
An alert created in alert management service.
| Name | Type | Description |
|---|---|---|
| id |
string |
Azure resource Id |
| name |
string |
Azure resource name |
| properties |
Alert property bag |
|
| type |
string |
Azure resource type |
AlertProperties
Alert property bag
| Name | Type | Description |
|---|---|---|
| context |
|
Information specific to the monitor service that gives more contextual details about the alert. |
| customProperties |
object |
Custom properties that can hold any user defined key-value pairs |
| egressConfig |
|
Config which would be used for displaying the data in portal. |
| essentials |
This object contains consistent fields across different monitor services. |
AlertsManagementErrorResponse
An error response from the service.
| Name | Type | Description |
|---|---|---|
| error |
Details of error response. |
AlertState
| Value | Description |
|---|---|
| New |
New |
| Acknowledged |
Acknowledged |
| Closed |
Closed |
Comments
Change alert state reason
| Name | Type | Description |
|---|---|---|
| comments |
string |
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. |
Essentials
This object contains consistent fields across different monitor services.
| Name | Type | Description |
|---|---|---|
| actionStatus |
Action status |
|
| alertRule |
string |
Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule. |
| alertState |
Alert object state, which can be modified by the user. |
|
| description |
string |
Alert description. |
| lastModifiedDateTime |
string (date-time) |
Last modification time(ISO-8601 format) of alert instance. |
| lastModifiedUserName |
string |
User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user. |
| monitorCondition |
Can be 'Fired' or 'Resolved', which represents whether the underlying conditions have crossed the defined alert rule thresholds. |
|
| monitorConditionResolvedDateTime |
string (date-time) |
Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met. |
| monitorService |
Monitor service on which the rule(monitor) is set. |
|
| severity |
Severity of alert Sev0 being highest and Sev4 being lowest. |
|
| signalType |
The type of signal the alert is based on, which could be metrics, logs or activity logs. |
|
| smartGroupId |
string |
Unique Id of the smart group |
| smartGroupingReason |
string |
Verbose reason describing the reason why this alert instance is added to a smart group |
| sourceCreatedId |
string |
Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc. |
| startDateTime |
string (date-time) |
Creation time(ISO-8601 format) of alert instance. |
| targetResource |
string |
Target ARM resource, on which alert got created. |
| targetResourceGroup |
string |
Resource group of target ARM resource, on which alert got created. |
| targetResourceName |
string |
Name of the target ARM resource name, on which alert got created. |
| targetResourceType |
string |
Resource type of target ARM resource, on which alert got created. |
MonitorCondition
| Value | Description |
|---|---|
| Fired |
Fired |
| Resolved |
Resolved |
MonitorService
| Value | Description |
|---|---|
| Application Insights |
Application Insights |
| ActivityLog Administrative |
ActivityLog Administrative |
| ActivityLog Security |
ActivityLog Security |
| ActivityLog Recommendation |
ActivityLog Recommendation |
| ActivityLog Policy |
ActivityLog Policy |
| ActivityLog Autoscale |
ActivityLog Autoscale |
| Log Analytics |
Log Analytics |
| Nagios |
Nagios |
| Platform |
Platform |
| SCOM |
SCOM |
| ServiceHealth |
ServiceHealth |
| SmartDetector |
SmartDetector |
| VM Insights |
VM Insights |
| Zabbix |
Zabbix |
| Resource Health |
Resource Health |
Severity
| Value | Description |
|---|---|
| Sev0 |
Sev0 |
| Sev1 |
Sev1 |
| Sev2 |
Sev2 |
| Sev3 |
Sev3 |
| Sev4 |
Sev4 |
SignalType
The type of signal the alert is based on, which could be metrics, logs or activity logs.
| Value | Description |
|---|---|
| Metric |
Metric |
| Log |
Log |
| Unknown |
Unknown |