{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-cat-allocation-allocation-record-schema.json",
  "title": "cat.allocation.AllocationRecord",
  "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.allocation.AllocationRecord",
  "type": "object",
  "properties": {
    "shards": {
      "description": "Number of primary and replica shards assigned to the node.",
      "type": "string"
    },
    "shards.undesired": {
      "description": "Amount of shards that are scheduled to be moved elsewhere in the cluster or -1 other than desired balance allocator is used",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "write_load.forecast": {
      "description": "Sum of index write load forecasts",
      "oneOf": [
        {
          "$ref": "#/$defs/_spec_utils.Stringifieddouble"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "disk.indices.forecast": {
      "description": "Sum of shard size forecasts",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "disk.indices": {
      "description": "Disk space used by the node’s shards. Does not include disk space for the translog or unassigned shards.\nIMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "disk.used": {
      "description": "Total disk space in use.\nElasticsearch retrieves this metric from the node’s operating system (OS).\nThe metric includes disk space for: Elasticsearch, including the translog and unassigned shards; the node’s operating system; any other applications or files on the node.\nUnlike `disk.indices`, this metric does not double-count disk space for hard-linked files.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "disk.avail": {
      "description": "Free disk space available to Elasticsearch.\nElasticsearch retrieves this metric from the node’s operating system.\nDisk-based shard allocation uses this metric to assign shards to nodes based on available disk space.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "disk.total": {
      "description": "Total disk space for the node, including in-use and available space.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "disk.percent": {
      "description": "Total percentage of disk space in use. Calculated as `disk.used / disk.total`.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.Percentage"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "host": {
      "description": "Network host for the node. Set using the `network.host` setting.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.Host"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "ip": {
      "description": "IP address and port for the node.",
      "oneOf": [
        {
          "$ref": "#/$defs/_types.Ip"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "node": {
      "description": "Name for the node. Set using the `node.name` setting.",
      "type": "string"
    },
    "node.role": {
      "description": "Node roles",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    }
  },
  "$defs": {
    "_spec_utils.Stringifieddouble": {
      "description": "Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior\nis used to capture this behavior while keeping the semantics of the field type.\n\nDepending on the target language, code generators can keep the union or remove it and leniently parse\nstrings to the target type.",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        }
      ]
    },
    "_types.ByteSize": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        }
      ]
    },
    "_types.Host": {
      "type": "string"
    },
    "_types.Ip": {
      "type": "string"
    },
    "_types.Percentage": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ]
    }
  }
}