{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-per-user-analytics-response-schema.json",
  "title": "PerUserAnalyticsResponse",
  "description": "Response for per-user analytics",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-tag-management-api-openapi.yml#/components/schemas/PerUserAnalyticsResponse",
  "properties": {
    "results": {
      "items": {
        "$ref": "#/$defs/PerUserMetrics"
      },
      "type": "array",
      "title": "Results"
    },
    "total_count": {
      "type": "integer",
      "title": "Total Count"
    },
    "page": {
      "type": "integer",
      "title": "Page"
    },
    "page_size": {
      "type": "integer",
      "title": "Page Size"
    },
    "total_pages": {
      "type": "integer",
      "title": "Total Pages"
    }
  },
  "type": "object",
  "required": [
    "results",
    "total_count",
    "page",
    "page_size",
    "total_pages"
  ],
  "$defs": {
    "PerUserMetrics": {
      "properties": {
        "user_id": {
          "type": "string",
          "title": "User Id"
        },
        "user_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Email"
        },
        "user_agent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Agent"
        },
        "successful_requests": {
          "type": "integer",
          "title": "Successful Requests",
          "default": 0
        },
        "failed_requests": {
          "type": "integer",
          "title": "Failed Requests",
          "default": 0
        },
        "total_requests": {
          "type": "integer",
          "title": "Total Requests",
          "default": 0
        },
        "total_tokens": {
          "type": "integer",
          "title": "Total Tokens",
          "default": 0
        },
        "spend": {
          "type": "number",
          "title": "Spend",
          "default": 0.0
        }
      },
      "type": "object",
      "required": [
        "user_id"
      ],
      "title": "PerUserMetrics",
      "description": "Metrics for individual user"
    }
  }
}