{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aqara/json-schema/aqara-studio-statistics-response-schema.json",
  "title": "StudioStatisticsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aqara-studio-api-openapi.yml#/components/schemas/StudioStatisticsResponse",
  "allOf": [
    {
      "$ref": "#/$defs/BaseResponse"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "$ref": "#/$defs/StudioStatisticsData"
        }
      }
    }
  ],
  "$defs": {
    "BaseResponse": {
      "type": "object",
      "required": [
        "type",
        "version",
        "msgId",
        "code"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "Message type"
        },
        "version": {
          "type": "string",
          "description": "API version"
        },
        "msgId": {
          "type": "string",
          "description": "Message ID"
        },
        "code": {
          "type": "integer",
          "description": "Business status code, 0 indicates success"
        },
        "message": {
          "type": "string",
          "description": "Message"
        }
      }
    },
    "StudioStatisticsData": {
      "type": "object",
      "description": "Studio statistics; returns only the statistical fields requested in dimensions",
      "properties": {
        "deviceCount": {
          "type": "integer",
          "description": "Number of devices"
        },
        "linkageCount": {
          "type": "integer",
          "description": "Number of automations"
        },
        "spaceCount": {
          "type": "integer",
          "description": "Number of spaces"
        },
        "sceneCount": {
          "type": "integer",
          "description": "Number of scenes"
        }
      }
    }
  }
}