{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getuptimely-com/json-schema/getuptimely-com-scheduled-maintenance-list-schema.json",
  "title": "ScheduledMaintenanceList",
  "description": "One page of maintenance windows, newest window first.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getuptimely-com-scheduled-maintenances-api-openapi.yml#/components/schemas/ScheduledMaintenanceList",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ScheduledMaintenance"
      },
      "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": {
    "ScheduledMaintenance": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable opaque maintenance id."
        },
        "title": {
          "type": "string",
          "description": "Maintenance window title."
        },
        "description": {
          "description": "Optional longer description.",
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "color": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "name",
            "color"
          ],
          "additionalProperties": false,
          "description": "Current window state, e.g. \"Scheduled\", \"Ongoing\", \"Completed\"."
        },
        "starts_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": "Window start, ISO-8601 UTC."
        },
        "ends_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": "Window end, ISO-8601 UTC."
        },
        "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."
        }
      },
      "required": [
        "id",
        "title",
        "description",
        "state",
        "starts_at",
        "ends_at",
        "created_at"
      ],
      "additionalProperties": false,
      "description": "A scheduled maintenance window and its current state."
    }
  }
}