Share via


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
alertId
path True

string

Unique ID of an alert instance.

api-version
query True

string

minLength: 1

The API version to use for this operation.

newState
query True

AlertState

New state of the alert.

Request Body

Name Type Description
comments

string

Responses

Name Type Description
200 OK

Alert

Azure operation completed successfully.

Other Status Codes

AlertsManagementErrorResponse

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

POST https://management.azure.com/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/changestate?api-version=2025-05-25-preview&newState=Acknowledged

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
ActionStatus

Action status

Alert

An alert created in alert management service.

AlertProperties

Alert property bag

AlertsManagementErrorResponse

An error response from the service.

AlertState
Comments

Change alert state reason

ErrorResponseBody

Details of error response.

Essentials

This object contains consistent fields across different monitor services.

MonitorCondition
MonitorService
Severity
SignalType

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

AlertProperties

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

Essentials

This object contains consistent fields across different monitor services.

AlertsManagementErrorResponse

An error response from the service.

Name Type Description
error

ErrorResponseBody

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

ErrorResponseBody[]

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

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

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

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

MonitorService

Monitor service on which the rule(monitor) is set.

severity

Severity

Severity of alert Sev0 being highest and Sev4 being lowest.

signalType

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