{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-search/json-schema/azure-ai-search-search-service-statistics-schema.json",
  "title": "SearchServiceStatistics",
  "description": "Response from a get service statistics request. If successful, it includes service level counters and limits.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ai-search-servicestats-api-openapi.yml#/components/schemas/SearchServiceStatistics",
  "type": "object",
  "properties": {
    "counters": {
      "$ref": "#/$defs/SearchServiceCounters",
      "description": "Service level resource counters."
    },
    "limits": {
      "$ref": "#/$defs/SearchServiceLimits",
      "description": "Service level general limits."
    },
    "indexersRuntime": {
      "$ref": "#/$defs/ServiceIndexersRuntime",
      "description": "Service level indexer runtime consumption."
    }
  },
  "required": [
    "counters",
    "limits"
  ],
  "$defs": {
    "ResourceCounter": {
      "type": "object",
      "description": "Represents a resource's usage and quota.",
      "properties": {
        "usage": {
          "type": "integer",
          "format": "int64",
          "description": "The resource usage amount."
        },
        "quota": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "The resource amount quota."
        }
      },
      "required": [
        "usage"
      ]
    },
    "SearchServiceCounters": {
      "type": "object",
      "description": "Represents service-level resource counters and quotas.",
      "properties": {
        "aliasesCount": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of aliases."
        },
        "documentCount": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of documents across all indexes in the service."
        },
        "indexesCount": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of indexes."
        },
        "indexersCount": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of indexers."
        },
        "dataSourcesCount": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of data sources."
        },
        "storageSize": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total size of used storage in bytes."
        },
        "synonymMaps": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of synonym maps."
        },
        "skillsetCount": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total number of skillsets."
        },
        "vectorIndexSize": {
          "$ref": "#/$defs/ResourceCounter",
          "description": "Total memory consumption of all vector indexes within the service, in bytes."
        }
      },
      "required": [
        "aliasesCount",
        "documentCount",
        "indexesCount",
        "indexersCount",
        "dataSourcesCount",
        "storageSize",
        "synonymMaps",
        "skillsetCount",
        "vectorIndexSize"
      ]
    },
    "SearchServiceLimits": {
      "type": "object",
      "description": "Represents various service level limits.",
      "properties": {
        "maxFieldsPerIndex": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The maximum allowed fields per index."
        },
        "maxFieldNestingDepthPerIndex": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3."
        },
        "maxComplexCollectionFieldsPerIndex": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index."
        },
        "maxComplexObjectsInCollectionsPerDocument": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The maximum number of objects in complex collections allowed per document."
        },
        "maxStoragePerIndex": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "The maximum amount of storage in bytes allowed per index."
        },
        "maxCumulativeIndexerRuntimeSeconds": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "The maximum cumulative indexer runtime in seconds allowed for the service."
        }
      }
    },
    "ServiceIndexersRuntime": {
      "type": "object",
      "description": "Represents service-level indexer runtime counters.",
      "properties": {
        "usedSeconds": {
          "type": "integer",
          "format": "int64",
          "description": "Cumulative runtime of all indexers in the service from the beginningTime to endingTime, in seconds."
        },
        "remainingSeconds": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Cumulative runtime remaining for all indexers in the service from the beginningTime to endingTime, in seconds."
        },
        "beginningTime": {
          "type": "string",
          "format": "date-time",
          "description": "Beginning UTC time of the 24-hour period considered for indexer runtime usage (inclusive)."
        },
        "endingTime": {
          "type": "string",
          "format": "date-time",
          "description": "End UTC time of the 24-hour period considered for indexer runtime usage (inclusive)."
        }
      },
      "required": [
        "usedSeconds",
        "beginningTime",
        "endingTime"
      ]
    }
  }
}