{
  "openapi": "3.1.0",
  "info": {
    "title": "RSX Status",
    "version": "v1",
    "description": "Public operational state for RSX services: current status, uptime, incidents, and scheduled maintenance."
  },
  "servers": [
    {
      "url": "https://api.rsx.group"
    }
  ],
  "components": {
    "schemas": {
      "StatusAdminService": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ]
          },
          "group": {
            "type": [
              "string",
              "null"
            ]
          },
          "displayOrder": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "hostname",
          "group",
          "displayOrder",
          "enabled",
          "createdAt",
          "updatedAt"
        ]
      },
      "StatusAddService": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "example": "API"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 253,
            "example": "api.rsx.group"
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "example": "Platform"
          },
          "displayOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "default": 0
          },
          "enabled": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "slug",
          "name"
        ]
      },
      "StatusUpdateService": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 280
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 253
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "displayOrder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "slug"
        ]
      },
      "StatusRemoveService": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "purge": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "slug"
        ]
      },
      "StatusIncidentStatus": {
        "type": "string",
        "enum": [
          "investigating",
          "identified",
          "monitoring",
          "resolved"
        ],
        "example": "investigating"
      },
      "StatusIncidentSeverity": {
        "type": "string",
        "enum": [
          "degraded",
          "partial-outage",
          "major-outage"
        ],
        "description": "Operational severity, expressed as the state the incident imposes on every service it affects.",
        "example": "partial-outage"
      },
      "StatusAffectedService": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "name": {
            "type": "string",
            "example": "API"
          }
        },
        "required": [
          "slug",
          "name"
        ]
      },
      "StatusIncident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "title": {
            "type": "string",
            "example": "Elevated API response times"
          },
          "status": {
            "$ref": "#/components/schemas/StatusIncidentStatus"
          },
          "severity": {
            "$ref": "#/components/schemas/StatusIncidentSeverity"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusAffectedService"
            }
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "severity",
          "startedAt",
          "resolvedAt",
          "createdAt",
          "updatedAt",
          "services"
        ]
      },
      "StatusAddIncident": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "severity": {
            "$ref": "#/components/schemas/StatusIncidentSeverity"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatusIncidentStatus"
              },
              {
                "default": "investigating"
              }
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "minItems": 1
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "title",
          "severity",
          "services",
          "body"
        ]
      },
      "StatusUpdateIncident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "severity": {
            "$ref": "#/components/schemas/StatusIncidentSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/StatusIncidentStatus"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "minItems": 1
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          }
        },
        "required": [
          "id"
        ]
      },
      "StatusIncidentUpdate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "incidentId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "status": {
            "$ref": "#/components/schemas/StatusIncidentStatus"
          },
          "body": {
            "type": "string",
            "example": "We are investigating elevated API response times."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          }
        },
        "required": [
          "id",
          "incidentId",
          "status",
          "body",
          "createdAt"
        ]
      },
      "StatusAddIncidentUpdate": {
        "type": "object",
        "properties": {
          "incidentId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "status": {
            "$ref": "#/components/schemas/StatusIncidentStatus"
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "incidentId",
          "body"
        ]
      },
      "StatusMaintenanceStatus": {
        "type": "string",
        "enum": [
          "scheduled",
          "active",
          "completed",
          "cancelled"
        ],
        "example": "scheduled"
      },
      "StatusMaintenance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "title": {
            "type": "string",
            "example": "Database maintenance"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Storage upgrade for the key store."
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "status": {
            "$ref": "#/components/schemas/StatusMaintenanceStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusAffectedService"
            }
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "startsAt",
          "endsAt",
          "status",
          "createdAt",
          "updatedAt",
          "services"
        ]
      },
      "StatusAddMaintenance": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "minItems": 1
          }
        },
        "required": [
          "title",
          "startsAt",
          "endsAt",
          "services"
        ]
      },
      "StatusMaintenanceDisposition": {
        "type": "string",
        "enum": [
          "scheduled",
          "completed",
          "cancelled"
        ],
        "example": "scheduled"
      },
      "StatusUpdateMaintenance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "status": {
            "$ref": "#/components/schemas/StatusMaintenanceDisposition"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "minItems": 1
          }
        },
        "required": [
          "id"
        ]
      },
      "StatusMeasurementStatus": {
        "type": "string",
        "enum": [
          "operational",
          "degraded",
          "down"
        ],
        "example": "operational"
      },
      "StatusMeasurement": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "status": {
            "$ref": "#/components/schemas/StatusMeasurementStatus"
          },
          "responseTimeMs": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 600000
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          }
        },
        "required": [
          "slug",
          "status",
          "observedAt"
        ]
      },
      "StatusRecordMeasurements": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "dashboard-cron"
          },
          "measurements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusMeasurement"
            },
            "minItems": 1,
            "maxItems": 200
          }
        },
        "required": [
          "source",
          "measurements"
        ]
      },
      "StatusAuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "018f3b1c-9a2e-7c31-8f4d-2a6b5c7e9d12"
          },
          "actor": {
            "type": "string",
            "example": "ops@rsx.group"
          },
          "action": {
            "type": "string",
            "enum": [
              "service.added",
              "service.updated",
              "service.removed",
              "service.purged",
              "incident.opened",
              "incident.updated",
              "incident.update-posted",
              "maintenance.scheduled",
              "maintenance.updated"
            ]
          },
          "targetType": {
            "type": "string",
            "enum": [
              "service",
              "incident",
              "maintenance"
            ]
          },
          "targetId": {
            "type": "string"
          },
          "targetLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-12T10:16:30.000Z"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "actor",
          "action",
          "targetType",
          "targetId",
          "targetLabel",
          "at",
          "detail"
        ]
      },
      "StatusOverallState": {
        "type": "string",
        "enum": [
          "operational",
          "maintenance",
          "unavailable",
          "degraded",
          "partial-outage",
          "major-outage"
        ],
        "description": "Aggregate state across every displayed service. `unavailable` means the status data itself is missing or stale.",
        "example": "operational"
      },
      "StatusServiceState": {
        "type": "string",
        "enum": [
          "operational",
          "maintenance",
          "unknown",
          "degraded",
          "partial-outage",
          "major-outage"
        ],
        "description": "Current operational state of one service. `unknown` means there is no fresh measurement, which is never reported as operational.",
        "example": "operational"
      },
      "StatusService": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "name": {
            "type": "string",
            "example": "API"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "The public API gateway."
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "example": "api.rsx.group"
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "example": "Platform"
          },
          "displayOrder": {
            "type": "integer",
            "example": 10
          },
          "state": {
            "$ref": "#/components/schemas/StatusServiceState"
          },
          "observedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "responseTimeMs": {
            "type": [
              "integer",
              "null"
            ],
            "example": 41
          },
          "stale": {
            "type": "boolean",
            "example": false
          },
          "activeIncidentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
            },
            "example": []
          },
          "activeMaintenanceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
            },
            "example": []
          }
        },
        "required": [
          "slug",
          "name",
          "description",
          "hostname",
          "group",
          "displayOrder",
          "state",
          "observedAt",
          "responseTimeMs",
          "stale",
          "activeIncidentIds",
          "activeMaintenanceIds"
        ]
      },
      "StatusServiceList": {
        "type": "object",
        "properties": {
          "overall": {
            "$ref": "#/components/schemas/StatusOverallState"
          },
          "checkedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "stale": {
            "type": "boolean",
            "example": false
          },
          "freshnessSeconds": {
            "type": "integer",
            "example": 2700
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusService"
            }
          }
        },
        "required": [
          "overall",
          "checkedAt",
          "stale",
          "freshnessSeconds",
          "services"
        ]
      },
      "StatusUptimePeriod": {
        "type": "string",
        "enum": [
          "24h",
          "7d",
          "30d",
          "90d"
        ],
        "example": "30d"
      },
      "StatusUptimeSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "example": "api"
          },
          "period": {
            "$ref": "#/components/schemas/StatusUptimePeriod"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-01T21:43:00.000Z"
          },
          "uptimePct": {
            "type": [
              "number",
              "null"
            ],
            "example": 99.98
          },
          "samples": {
            "type": "integer",
            "example": 2880
          },
          "intervalSeconds": {
            "type": "integer",
            "example": 900
          },
          "avgResponseTimeMs": {
            "type": [
              "integer",
              "null"
            ],
            "example": 44
          }
        },
        "required": [
          "slug",
          "period",
          "from",
          "to",
          "uptimePct",
          "samples",
          "intervalSeconds",
          "avgResponseTimeMs"
        ]
      },
      "StatusServiceDetail": {
        "type": "object",
        "properties": {
          "service": {
            "$ref": "#/components/schemas/StatusService"
          },
          "uptime": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusUptimeSummary"
            }
          },
          "incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusIncident"
            }
          },
          "maintenance": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusMaintenance"
            }
          }
        },
        "required": [
          "service",
          "uptime",
          "incidents",
          "maintenance"
        ]
      },
      "StatusIncidentDetail": {
        "type": "object",
        "properties": {
          "incident": {
            "$ref": "#/components/schemas/StatusIncident"
          },
          "updates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusIncidentUpdate"
            }
          }
        },
        "required": [
          "incident",
          "updates"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/status/v1/admin/services/list": {
      "get": {
        "operationId": "adminListStatusServices",
        "summary": "The service catalogue, including services taken off the page",
        "tags": [
          "admin"
        ],
        "parameters": [
          {
            "schema": {
              "type": [
                "boolean",
                "null"
              ],
              "default": true
            },
            "required": false,
            "name": "includeDisabled",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The catalogue in display order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StatusAdminService"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/services/add": {
      "post": {
        "operationId": "adminAddStatusService",
        "summary": "Put a service on the status page",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusAddService"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The service as stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusAdminService"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/services/update": {
      "post": {
        "operationId": "adminUpdateStatusService",
        "summary": "Amend a service on the status page",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusUpdateService"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The service as stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusAdminService"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/services/remove": {
      "post": {
        "operationId": "adminRemoveStatusService",
        "summary": "Take a service off the status page, or purge it entirely",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusRemoveService"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What happened to the service",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "slug": {
                          "type": "string"
                        },
                        "purged": {
                          "type": "boolean",
                          "example": false
                        }
                      },
                      "required": [
                        "slug",
                        "purged"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/incidents/add": {
      "post": {
        "operationId": "adminAddStatusIncident",
        "summary": "Publish an incident",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusAddIncident"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The published incident, with its opening timeline entry written",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusIncident"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/incidents/update": {
      "post": {
        "operationId": "adminUpdateStatusIncident",
        "summary": "Amend or resolve an incident",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusUpdateIncident"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The amended incident",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusIncident"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/incident-updates/add": {
      "post": {
        "operationId": "adminAddStatusIncidentUpdate",
        "summary": "Append an entry to an incident's timeline",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusAddIncidentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The timeline entry, and the incident status it moved to",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusIncidentUpdate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/maintenance/add": {
      "post": {
        "operationId": "adminAddStatusMaintenance",
        "summary": "Schedule a maintenance window",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusAddMaintenance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The scheduled window",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusMaintenance"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/maintenance/update": {
      "post": {
        "operationId": "adminUpdateStatusMaintenance",
        "summary": "Amend, complete or cancel a maintenance window",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusUpdateMaintenance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The amended window",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusMaintenance"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/measurements/record": {
      "post": {
        "operationId": "adminRecordStatusMeasurements",
        "summary": "Append a probe run",
        "tags": [
          "admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusRecordMeasurements"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many measurements were stored, and which slugs were not recognised",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "recorded": {
                          "type": "integer",
                          "example": 8
                        },
                        "unknown": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "example": []
                        }
                      },
                      "required": [
                        "recorded",
                        "unknown"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/admin/audit/list": {
      "get": {
        "operationId": "adminListStatusAudit",
        "summary": "Who changed the status page, and what they changed",
        "description": "Every operator write, newest first: services put on and taken off the page, incidents opened, changed and posted to, maintenance scheduled and changed. The probe's measurements are not in it.",
        "tags": [
          "admin"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "service",
                "incident",
                "maintenance"
              ]
            },
            "required": false,
            "name": "targetType",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "required": false,
            "name": "targetId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 320
            },
            "required": false,
            "name": "actor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "service.added",
                "service.updated",
                "service.removed",
                "service.purged",
                "incident.opened",
                "incident.updated",
                "incident.update-posted",
                "maintenance.scheduled",
                "maintenance.updated"
              ]
            },
            "required": false,
            "name": "action",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "default": 0,
              "example": 0
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "example": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Audit events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StatusAuditEvent"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "offset": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "more": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "offset",
                        "limit",
                        "more"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/services/list": {
      "get": {
        "operationId": "listStatusServices",
        "summary": "Current state of every service on the status page",
        "tags": [
          "services"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "example": "Platform"
            },
            "required": false,
            "name": "group",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The overview: aggregate state, freshness, and every displayed service",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusServiceList"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/services/get": {
      "get": {
        "operationId": "getStatusService",
        "summary": "One service, with its uptime, incidents and maintenance",
        "tags": [
          "services"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "required": true,
            "name": "slug",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Everything the service detail page renders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusServiceDetail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/uptime/get": {
      "get": {
        "operationId": "getStatusUptime",
        "summary": "Uptime for one service over one period",
        "tags": [
          "uptime"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "required": true,
            "name": "slug",
            "in": "query"
          },
          {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/StatusUptimePeriod"
                },
                {
                  "default": "30d"
                }
              ]
            },
            "required": false,
            "name": "period",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Uptime, with the window and sample count it was computed from",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusUptimeSummary"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/incidents/list": {
      "get": {
        "operationId": "listStatusIncidents",
        "summary": "Incidents, newest first",
        "tags": [
          "incidents"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "resolved"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "required": false,
            "name": "slug",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-09-01T21:43:00.000Z"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-09-01T21:43:00.000Z"
            },
            "required": false,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "example": 20
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Incidents, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StatusIncident"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "cursor"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/incidents/get": {
      "get": {
        "operationId": "getStatusIncident",
        "summary": "One incident and its timeline",
        "tags": [
          "incidents"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
            },
            "required": true,
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The incident, its affected services, and its ordered timeline",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusIncidentDetail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/maintenance/list": {
      "get": {
        "operationId": "listStatusMaintenance",
        "summary": "Maintenance windows, newest first",
        "tags": [
          "maintenance"
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/StatusMaintenanceStatus"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9-]*$",
              "example": "api"
            },
            "required": false,
            "name": "slug",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-09-01T21:43:00.000Z"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2026-09-01T21:43:00.000Z"
            },
            "required": false,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "example": 20
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Maintenance windows, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StatusMaintenance"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "cursor"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/status/v1/maintenance/get": {
      "get": {
        "operationId": "getStatusMaintenance",
        "summary": "One maintenance window and its affected services",
        "tags": [
          "maintenance"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "example": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d"
            },
            "required": true,
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The maintenance window",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatusMaintenance"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
