{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Diagnostics for every subsystem. Answers 200 whatever the overall status; a subsystem being down is reported in the body, not as a failed request.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "status": {
              "description": "The worst status across every subsystem.",
              "enum": [
                "ok",
                "degraded",
                "down",
                "disabled"
              ],
              "type": "string"
            },
            "subsystems": {
              "description": "Map of subsystem name to its report.",
              "type": "unknown"
            },
            "uptime": {
              "description": "Seconds since the process started.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "status"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "subsystemReport": {
      "description": "The fields every subsystem's report shares. Each subsystem may add its own detail alongside these.",
      "properties": {
        "label": {
          "description": "Human-readable name for the subsystem.",
          "type": "string"
        },
        "since": {
          "description": "Seconds the subsystem has held its current status.",
          "minimum": 0,
          "type": "integer"
        },
        "stale": {
          "description": "Set when a subsystem that reports on a timer missed its window; its status is then 'down'.",
          "type": "boolean"
        },
        "status": {
          "enum": [
            "ok",
            "degraded",
            "down",
            "disabled"
          ],
          "type": "string"
        }
      },
      "required": [
        "status",
        "since"
      ],
      "type": "object"
    }
  },
  "id": "net.atchan.status.getHealth",
  "lexicon": 1
}
