{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getuptimely-com/json-schema/getuptimely-com-alert-list-schema.json",
  "title": "AlertList",
  "description": "One page of the project's alerts, newest first.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getuptimely-com-alerts-api-openapi.yml#/components/schemas/AlertList",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Alert"
      },
      "description": "The current page of results."
    },
    "has_more": {
      "type": "boolean",
      "description": "True when another page exists after this one."
    },
    "next_cursor": {
      "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "has_more",
    "next_cursor"
  ],
  "additionalProperties": false,
  "$defs": {
    "Alert": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable opaque alert id."
        },
        "number": {
          "description": "Human-facing sequential alert number.",
          "type": [
            "number",
            "null"
          ]
        },
        "title": {
          "type": "string",
          "description": "Alert title."
        },
        "description": {
          "description": "Optional longer description.",
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "$ref": "#/$defs/AlertStateRef"
        },
        "severity": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeverityRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "monitor": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "The monitor this alert belongs to."
        },
        "created_at": {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "format": "date-time",
          "description": "Creation time, ISO-8601 UTC."
        },
        "updated_at": {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "format": "date-time",
          "description": "Last update time, ISO-8601 UTC."
        }
      },
      "required": [
        "id",
        "number",
        "title",
        "description",
        "state",
        "severity",
        "monitor",
        "created_at",
        "updated_at"
      ],
      "additionalProperties": false,
      "description": "An alert and its current lifecycle state."
    },
    "AlertStateRef": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Current lifecycle state name, e.g. \"Created\"."
        },
        "color": {
          "description": "Display color of the state (hex), when configured.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "color"
      ],
      "additionalProperties": false,
      "description": "An alert lifecycle state."
    },
    "SeverityRef": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Severity name, e.g. \"Minor\" or \"Major\"."
        },
        "color": {
          "description": "Display color of the severity (hex), when configured.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "color"
      ],
      "additionalProperties": false,
      "description": "A configured severity level."
    }
  }
}