{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-cat-shards-shards-record-schema.json",
  "title": "cat.shards.ShardsRecord",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-cat-api-openapi.yml#/components/schemas/cat.shards.ShardsRecord",
  "type": "object",
  "properties": {
    "index": {
      "description": "The index name.",
      "type": "string"
    },
    "shard": {
      "description": "The shard name.",
      "type": "string"
    },
    "prirep": {
      "description": "The shard type: `primary` or `replica`.",
      "type": "string"
    },
    "state": {
      "description": "The shard state.\nReturned values include:\n`INITIALIZING`: The shard is recovering from a peer shard or gateway.\n`RELOCATING`: The shard is relocating.\n`STARTED`: The shard has started.\n`UNASSIGNED`: The shard is not assigned to any node.",
      "type": "string"
    },
    "docs": {
      "description": "The number of documents in the shard.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "store": {
      "description": "The disk space used by the shard.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "dataset": {
      "description": "total size of dataset (including the cache for partially mounted indices)",
      "x-state": "Generally available; Added in 8.11.0",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "ip": {
      "description": "The IP address of the node.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "id": {
      "description": "The unique identifier for the node.",
      "type": "string"
    },
    "node": {
      "description": "The name of node.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "sync_id": {
      "description": "The sync identifier.",
      "type": "string"
    },
    "unassigned.reason": {
      "description": "The reason for the last change to the state of an unassigned shard.\nIt does not explain why the shard is currently unassigned; use the cluster allocation explain API for that information.\nReturned values include:\n`ALLOCATION_FAILED`: Unassigned as a result of a failed allocation of the shard.\n`CLUSTER_RECOVERED`: Unassigned as a result of a full cluster recovery.\n`DANGLING_INDEX_IMPORTED`: Unassigned as a result of importing a dangling index.\n`EXISTING_INDEX_RESTORED`: Unassigned as a result of restoring into a closed index.\n`FORCED_EMPTY_PRIMARY`: The shard’s allocation was last modified by forcing an empty primary using the cluster reroute API.\n`INDEX_CLOSED`: Unassigned because the index was closed.\n`INDEX_CREATED`: Unassigned as a result of an API creation of an index.\n`INDEX_REOPENED`: Unassigned as a result of opening a closed index.\n`MANUAL_ALLOCATION`: The shard’s allocation was last modified by the cluster reroute API.\n`NEW_INDEX_RESTORED`: Unassigned as a result of restoring into a new index.\n`NODE_LEFT`: Unassigned as a result of the node hosting it leaving the cluster.\n`NODE_RESTARTING`: Similar to `NODE_LEFT`, except that the node was registered as restarting using the node shutdown API.\n`PRIMARY_FAILED`: The shard was initializing as a replica, but the primary shard failed before the initialization completed.\n`REALLOCATED_REPLICA`: A better replica location is identified and causes the existing replica allocation to be cancelled.\n`REINITIALIZED`: When a shard moves from started back to initializing.\n`REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica.\n`REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command.",
      "type": "string"
    },
    "unassigned.at": {
      "description": "The time at which the shard became unassigned in Coordinated Universal Time (UTC).",
      "type": "string"
    },
    "unassigned.for": {
      "description": "The time at which the shard was requested to be unassigned in Coordinated Universal Time (UTC).",
      "type": "string"
    },
    "unassigned.details": {
      "description": "Additional details as to why the shard became unassigned.\nIt does not explain why the shard is not assigned; use the cluster allocation explain API for that information.",
      "type": "string"
    },
    "recoverysource.type": {
      "description": "The type of recovery source.",
      "type": "string"
    },
    "completion.size": {
      "description": "The size of completion.",
      "type": "string"
    },
    "fielddata.memory_size": {
      "description": "The used fielddata cache memory.",
      "type": "string"
    },
    "fielddata.evictions": {
      "description": "The fielddata cache evictions.",
      "type": "string"
    },
    "query_cache.memory_size": {
      "description": "The used query cache memory.",
      "type": "string"
    },
    "query_cache.evictions": {
      "description": "The query cache evictions.",
      "type": "string"
    },
    "flush.total": {
      "description": "The number of flushes.",
      "type": "string"
    },
    "flush.total_time": {
      "description": "The time spent in flush.",
      "type": "string"
    },
    "get.current": {
      "description": "The number of current get operations.",
      "type": "string"
    },
    "get.time": {
      "description": "The time spent in get operations.",
      "type": "string"
    },
    "get.total": {
      "description": "The number of get operations.",
      "type": "string"
    },
    "get.exists_time": {
      "description": "The time spent in successful get operations.",
      "type": "string"
    },
    "get.exists_total": {
      "description": "The number of successful get operations.",
      "type": "string"
    },
    "get.missing_time": {
      "description": "The time spent in failed get operations.",
      "type": "string"
    },
    "get.missing_total": {
      "description": "The number of failed get operations.",
      "type": "string"
    },
    "indexing.delete_current": {
      "description": "The number of current deletion operations.",
      "type": "string"
    },
    "indexing.delete_time": {
      "description": "The time spent in deletion operations.",
      "type": "string"
    },
    "indexing.delete_total": {
      "description": "The number of delete operations.",
      "type": "string"
    },
    "indexing.index_current": {
      "description": "The number of current indexing operations.",
      "type": "string"
    },
    "indexing.index_time": {
      "description": "The time spent in indexing operations.",
      "type": "string"
    },
    "indexing.index_total": {
      "description": "The number of indexing operations.",
      "type": "string"
    },
    "indexing.index_failed": {
      "description": "The number of failed indexing operations.",
      "type": "string"
    },
    "merges.current": {
      "description": "The number of current merge operations.",
      "type": "string"
    },
    "merges.current_docs": {
      "description": "The number of current merging documents.",
      "type": "string"
    },
    "merges.current_size": {
      "description": "The size of current merge operations.",
      "type": "string"
    },
    "merges.total": {
      "description": "The number of completed merge operations.",
      "type": "string"
    },
    "merges.total_docs": {
      "description": "The nuber of merged documents.",
      "type": "string"
    },
    "merges.total_size": {
      "description": "The size of current merges.",
      "type": "string"
    },
    "merges.total_time": {
      "description": "The time spent merging documents.",
      "type": "string"
    },
    "refresh.total": {
      "description": "The total number of refreshes.",
      "type": "string"
    },
    "refresh.time": {
      "description": "The time spent in refreshes.",
      "type": "string"
    },
    "refresh.external_total": {
      "description": "The total nunber of external refreshes.",
      "type": "string"
    },
    "refresh.external_time": {
      "description": "The time spent in external refreshes.",
      "type": "string"
    },
    "refresh.listeners": {
      "description": "The number of pending refresh listeners.",
      "type": "string"
    },
    "search.fetch_current": {
      "description": "The current fetch phase operations.",
      "type": "string"
    },
    "search.fetch_time": {
      "description": "The time spent in fetch phase.",
      "type": "string"
    },
    "search.fetch_total": {
      "description": "The total number of fetch operations.",
      "type": "string"
    },
    "search.open_contexts": {
      "description": "The number of open search contexts.",
      "type": "string"
    },
    "search.query_current": {
      "description": "The current query phase operations.",
      "type": "string"
    },
    "search.query_time": {
      "description": "The time spent in query phase.",
      "type": "string"
    },
    "search.query_total": {
      "description": "The total number of query phase operations.",
      "type": "string"
    },
    "search.scroll_current": {
      "description": "The open scroll contexts.",
      "type": "string"
    },
    "search.scroll_time": {
      "description": "The time scroll contexts were held open.",
      "type": "string"
    },
    "search.scroll_total": {
      "description": "The number of completed scroll contexts.",
      "type": "string"
    },
    "segments.count": {
      "description": "The number of segments.",
      "type": "string"
    },
    "segments.memory": {
      "description": "The memory used by segments.",
      "type": "string"
    },
    "segments.index_writer_memory": {
      "description": "The memory used by the index writer.",
      "type": "string"
    },
    "segments.version_map_memory": {
      "description": "The memory used by the version map.",
      "type": "string"
    },
    "segments.fixed_bitset_memory": {
      "description": "The memory used by fixed bit sets for nested object field types and export type filters for types referred in `_parent` fields.",
      "type": "string"
    },
    "seq_no.max": {
      "description": "The maximum sequence number.",
      "type": "string"
    },
    "seq_no.local_checkpoint": {
      "description": "The local checkpoint.",
      "type": "string"
    },
    "seq_no.global_checkpoint": {
      "description": "The global checkpoint.",
      "type": "string"
    },
    "warmer.current": {
      "description": "The number of current warmer operations.",
      "type": "string"
    },
    "warmer.total": {
      "description": "The total number of warmer operations.",
      "type": "string"
    },
    "warmer.total_time": {
      "description": "The time spent in warmer operations.",
      "type": "string"
    },
    "path.data": {
      "description": "The shard data path.",
      "type": "string"
    },
    "path.state": {
      "description": "The shard state path.",
      "type": "string"
    },
    "bulk.total_operations": {
      "description": "The number of bulk shard operations.",
      "type": "string"
    },
    "bulk.total_time": {
      "description": "The time spent in shard bulk operations.",
      "type": "string"
    },
    "bulk.total_size_in_bytes": {
      "description": "The total size in bytes of shard bulk operations.",
      "type": "string"
    },
    "bulk.avg_time": {
      "description": "The average time spent in shard bulk operations.",
      "type": "string"
    },
    "bulk.avg_size_in_bytes": {
      "description": "The average size in bytes of shard bulk operations.",
      "type": "string"
    }
  }
}