{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-alerts-schema.json",
  "title": "Alerts",
  "description": "The list of alerts for a service.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-alerts-api-openapi.yml#/components/schemas/Alerts",
  "type": "object",
  "properties": {
    "value": {
      "description": "The value returned by the operation.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Alert"
      }
    },
    "nextLink": {
      "description": "The link used to get the next page of operations.",
      "type": "string"
    },
    "totalCount": {
      "description": "The total count of alert elements.",
      "type": "integer"
    },
    "continuationToken": {
      "description": "The continuation token for paginated calls.",
      "type": "string"
    }
  },
  "$defs": {
    "AdditionalInformation": {
      "description": "The additional information for a property.",
      "type": "object",
      "properties": {
        "titleName": {
          "description": "The title name for the property.",
          "type": "string"
        },
        "titleValue": {
          "description": "The title value for the property.",
          "type": "string"
        },
        "properties": {
          "description": "The list of properties which are included in the additional information.",
          "type": "object",
          "items": {
            "$ref": "#/$defs/Item"
          }
        },
        "hasProperties": {
          "description": "Indicates if properties are present or not.",
          "type": "boolean"
        }
      }
    },
    "Alert": {
      "description": " The alert details indicating an issue with service or server.",
      "type": "object",
      "properties": {
        "alertId": {
          "description": "The alert Id.",
          "type": "string",
          "format": "uuid"
        },
        "level": {
          "description": "The alert level which indicates the severity of the alert.",
          "type": "string",
          "enum": [
            "Warning",
            "Error",
            "PreWarning"
          ],
          "x-ms-enum": {
            "name": "Level",
            "modelAsString": true
          }
        },
        "state": {
          "description": "The alert state which can be either active or resolved with multiple resolution types.",
          "type": "string",
          "enum": [
            "Active",
            "ResolvedByPositiveResult",
            "ResolvedManually",
            "ResolvedByTimer",
            "ResolvedByStateChange"
          ],
          "x-ms-enum": {
            "name": "State",
            "modelAsString": true
          }
        },
        "shortName": {
          "description": "The alert short name.",
          "type": "string"
        },
        "displayName": {
          "description": "The display name for the alert.",
          "type": "string"
        },
        "description": {
          "description": "The alert description.",
          "type": "string"
        },
        "remediation": {
          "description": "The alert remediation.",
          "type": "string"
        },
        "relatedLinks": {
          "description": "The help links to get more information related to the alert.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/HelpLink"
          }
        },
        "scope": {
          "description": "The scope of the alert. Indicates if it is a service or a server related alert.",
          "type": "string"
        },
        "additionalInformation": {
          "description": "Additional information related to the alert.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdditionalInformation"
          }
        },
        "createdDate": {
          "description": "The date and time,in UTC,when the alert was created.",
          "type": "string",
          "format": "date-time"
        },
        "resolvedDate": {
          "description": "The date and time, in UTC, when the alert was resolved.",
          "type": "string",
          "format": "date-time"
        },
        "lastUpdated": {
          "description": "The date and time, in UTC, when the alert was last updated.",
          "type": "string",
          "format": "date-time"
        },
        "monitorRoleType": {
          "description": "The monitoring role type for which the alert was raised.",
          "type": "string"
        },
        "activeAlertProperties": {
          "description": "The active alert properties.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Item"
          }
        },
        "resolvedAlertProperties": {
          "description": "The resolved alert properties.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Item"
          }
        },
        "tenantId": {
          "description": "The tenant Id.",
          "type": "string",
          "format": "uuid"
        },
        "serviceId": {
          "description": "The service Id.",
          "type": "string",
          "format": "uuid"
        },
        "serviceMemberId": {
          "description": "The server Id.",
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "HelpLink": {
      "description": "The help link which contains more information related to an alert.",
      "type": "object",
      "properties": {
        "title": {
          "description": "The title for the link.",
          "type": "string"
        },
        "url": {
          "description": "The url for the help document.",
          "type": "string"
        }
      }
    },
    "Item": {
      "description": "The key value pair for properties.",
      "type": "object",
      "properties": {
        "key": {
          "description": "The key for the property.",
          "type": "string"
        },
        "value": {
          "description": "The value for the key.",
          "type": "string"
        }
      }
    }
  }
}