{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-alerts-api-alert-suppression-window-request-schema.json",
  "title": "Alerts_API_AlertSuppressionWindowRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-alert-suppression-windows-api-openapi.yml#/components/schemas/Alerts_API_AlertSuppressionWindowRequest",
  "allOf": [
    {
      "$ref": "#/$defs/Alerts_API_BaseAlertSuppressionWindow"
    },
    {
      "type": "object",
      "properties": {
        "testIds": {
          "type": "array",
          "description": "List of test IDs to assign to the alert suppression window.",
          "items": {
            "type": "string"
          }
        }
      }
    }
  ],
  "$defs": {
    "Alerts_API_AlertSuppressionWindowState": {
      "type": "string",
      "enum": [
        "active",
        "inactive",
        "ended"
      ],
      "description": "Indicates the current status of the suppression window.",
      "readOnly": true
    },
    "Alerts_API_BaseAlertSuppressionWindow": {
      "type": "object",
      "description": "Alert suppression window.",
      "properties": {
        "alertSuppressionWindowId": {
          "type": "string",
          "description": "Unique ID of the alert suppression window.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of the alert suppression window."
        },
        "isEnabled": {
          "type": "boolean",
          "description": "Set to `false` for `disabled`, `true` for `enabled`."
        },
        "status": {
          "$ref": "#/$defs/Alerts_API_AlertSuppressionWindowState"
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date/time when the alert suppression window starts (ISO date-time format)."
        },
        "duration": {
          "type": "integer",
          "description": "Duration in seconds the suppression window is active."
        },
        "repeat": {
          "$ref": "#/$defs/Alerts_API_Repeat"
        },
        "endRepeat": {
          "$ref": "#/$defs/Alerts_API_EndRepeat"
        }
      }
    },
    "Alerts_API_DaysOfWeek": {
      "type": "string",
      "description": "Specifies the day to activate the alert suppression window. Applicable only when `intervalType` is set to `week`.",
      "enum": [
        "sun",
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat"
      ]
    },
    "Alerts_API_EndRepeat": {
      "type": "object",
      "description": "End repeat options.",
      "properties": {
        "type": {
          "$ref": "#/$defs/Alerts_API_EndRepeatType"
        },
        "count": {
          "type": "integer",
          "description": "End repeat after number of occurrences, only valid with count type option."
        },
        "date": {
          "type": "string",
          "format": "date",
          "description": "End repeat after specific date, only valid with date type option (ISO date format)."
        }
      }
    },
    "Alerts_API_EndRepeatType": {
      "type": "string",
      "description": "End repeat options type.",
      "enum": [
        "count",
        "never",
        "date"
      ]
    },
    "Alerts_API_IntervalType": {
      "type": "string",
      "description": "Repeat options interval type",
      "enum": [
        "day",
        "week",
        "month"
      ]
    },
    "Alerts_API_Repeat": {
      "type": "object",
      "description": "Repeat options.",
      "properties": {
        "type": {
          "$ref": "#/$defs/Alerts_API_RepeatType"
        },
        "intervalType": {
          "$ref": "#/$defs/Alerts_API_IntervalType"
        },
        "intervalLength": {
          "type": "integer",
          "description": "Number of `intervalTypes` to wait before reactivating the alert suppression window."
        },
        "daysOfWeek": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Alerts_API_DaysOfWeek"
          }
        }
      }
    },
    "Alerts_API_RepeatType": {
      "type": "string",
      "description": "Repeat options type.",
      "enum": [
        "day",
        "week",
        "month",
        "custom"
      ]
    }
  }
}