{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/slimlytics-com/json-schema/slimlytics-com-overview-schema.json",
  "title": "Overview",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/slimlytics-com-openapi.json#/components/schemas/Overview",
  "type": "object",
  "required": [
    "views",
    "visitors",
    "sessions",
    "events",
    "currentOnline",
    "bounceRate",
    "avgDurationSeconds",
    "trend"
  ],
  "properties": {
    "views": {
      "$ref": "#/$defs/Metric"
    },
    "visitors": {
      "$ref": "#/$defs/Metric"
    },
    "sessions": {
      "$ref": "#/$defs/Metric"
    },
    "events": {
      "$ref": "#/$defs/Metric"
    },
    "currentOnline": {
      "type": "integer",
      "description": "Distinct human visitors with an event in the last five minutes"
    },
    "bounceRate": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "avgDurationSeconds": {
      "type": "number",
      "minimum": 0
    },
    "trend": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TrendPoint"
      }
    },
    "hourly": {
      "type": "array",
      "description": "Present only for single-day ranges: each hour of the day (23 or 25 on daylight saving days) beside the same local clock hour of the comparison day",
      "items": {
        "$ref": "#/$defs/HourPoint"
      }
    }
  },
  "$defs": {
    "HourPoint": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "hour",
        "visitors",
        "pageViews",
        "previousVisitors",
        "previousPageViews"
      ],
      "properties": {
        "hour": {
          "type": "integer",
          "minimum": 0,
          "maximum": 23,
          "description": "Local clock hour the slot starts at, in the site's timezone; repeats on the day clocks fall back"
        },
        "visitors": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "description": "Null for hours that have not started yet"
        },
        "pageViews": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "description": "Null for hours that have not started yet"
        },
        "previousVisitors": {
          "type": "integer",
          "minimum": 0
        },
        "previousPageViews": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "Metric": {
      "type": "object",
      "required": [
        "current",
        "previous",
        "change_percent"
      ],
      "properties": {
        "current": {
          "type": "integer"
        },
        "previous": {
          "type": "integer"
        },
        "change_percent": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "TrendPoint": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "date",
        "visitors",
        "pageViews"
      ],
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "visitors": {
          "type": "integer",
          "minimum": 0
        },
        "pageViews": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}