{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-alerting-configuration-with-last-updated-schema.json",
  "title": "AlertingConfigurationWithLastUpdated",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-event-settings-api-openapi.yml#/components/schemas/AlertingConfigurationWithLastUpdated",
  "type": "object",
  "properties": {
    "alertName": {
      "type": "string",
      "description": "Name of the Alert Configuration.",
      "maxLength": 256,
      "minLength": 0
    },
    "customPayloadFields": {
      "type": "array",
      "description": "Custom payload fields to send additional information in the alert notifications. Can be left empty.",
      "items": {
        "$ref": "#/$defs/StaticStringField"
      },
      "maxItems": 20,
      "minItems": 0
    },
    "eventFilteringConfiguration": {
      "$ref": "#/$defs/EventFilteringConfiguration"
    },
    "id": {
      "type": "string",
      "description": "ID of the Alert Configuration.",
      "maxLength": 64,
      "minLength": 0
    },
    "includeEntityNameInLegacyAlerts": {
      "type": "boolean",
      "description": "To include the entity name in a legacy alert based on built-in/custom events."
    },
    "integrationIds": {
      "type": "array",
      "description": "List of Alert Channel IDs added in this Alert Configuration.",
      "items": {
        "type": "string",
        "description": "List of Alert Channel IDs added in this Alert Configuration."
      },
      "maxItems": 1024,
      "minItems": 0,
      "uniqueItems": true
    },
    "lastUpdated": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp representing the time the configuration was last updated.",
      "minimum": 1
    },
    "muteUntil": {
      "type": "integer",
      "format": "int64",
      "description": "Timer dictating how long the Alert Configuration will stay muted. A value of `0` means the Alert Configuration is currently enabled. Otherwise, the Alert Configuration is currently disabled (muted)."
    }
  },
  "required": [
    "alertName",
    "customPayloadFields",
    "eventFilteringConfiguration",
    "id",
    "integrationIds"
  ],
  "$defs": {
    "CustomPayloadField": {
      "type": "object",
      "description": "Custom payload fields to send additional information in the alert notifications. Can be left empty.",
      "properties": {
        "key": {
          "type": "string",
          "description": "A user-specified unique identifier or name for a custom payload entry."
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "key",
        "type"
      ]
    },
    "EventFilteringConfiguration": {
      "type": "object",
      "description": "Event Filter Configuration for supporting the scope of the Alert Configuration. Applies a filter based on the application perspective or selected entities.",
      "properties": {
        "applicationAlertConfigIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 1024,
          "minItems": 0,
          "uniqueItems": true
        },
        "eventTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "incident",
              "critical",
              "warning",
              "change",
              "online",
              "offline",
              "agent_monitoring_issue",
              "cve_issue",
              "none"
            ]
          },
          "maxItems": 1024,
          "minItems": 0,
          "uniqueItems": true
        },
        "query": {
          "type": "string",
          "maxLength": 2048,
          "minLength": 0
        },
        "ruleIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 1024,
          "minItems": 0,
          "uniqueItems": true
        }
      }
    },
    "StaticStringField": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/CustomPayloadField"
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "type": "string",
              "description": "Custom value for static type custom payload"
            }
          }
        }
      ],
      "required": [
        "key",
        "value"
      ]
    }
  }
}