{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-cluster-allocation-explain-node-allocation-explanation-schema.json",
  "title": "cluster.allocation_explain.NodeAllocationExplanation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-cluster-api-openapi.yml#/components/schemas/cluster.allocation_explain.NodeAllocationExplanation",
  "type": "object",
  "properties": {
    "deciders": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/cluster.allocation_explain.AllocationDecision"
      }
    },
    "node_attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "node_decision": {
      "allOf": [
        {
          "$ref": "#/$defs/cluster.allocation_explain.Decision"
        }
      ]
    },
    "node_id": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.Id"
        }
      ]
    },
    "node_name": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.Name"
        }
      ]
    },
    "roles": {
      "x-state": "Generally available; Added in 8.11.0",
      "allOf": [
        {
          "$ref": "#/$defs/_types.NodeRoles"
        }
      ]
    },
    "store": {
      "allOf": [
        {
          "$ref": "#/$defs/cluster.allocation_explain.AllocationStore"
        }
      ]
    },
    "transport_address": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.TransportAddress"
        }
      ]
    },
    "weight_ranking": {
      "type": "number"
    }
  },
  "required": [
    "node_attributes",
    "node_decision",
    "node_id",
    "node_name",
    "roles",
    "transport_address"
  ],
  "$defs": {
    "_types.Id": {
      "type": "string"
    },
    "_types.Name": {
      "type": "string"
    },
    "_types.NodeRole": {
      "type": "string",
      "enum": [
        "master",
        "data",
        "data_cold",
        "data_content",
        "data_frozen",
        "data_hot",
        "data_warm",
        "client",
        "ingest",
        "ml",
        "voting_only",
        "transform",
        "remote_cluster_client",
        "coordinating_only"
      ]
    },
    "_types.NodeRoles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/_types.NodeRole"
      }
    },
    "_types.TransportAddress": {
      "type": "string"
    },
    "cluster.allocation_explain.AllocationDecision": {
      "type": "object",
      "properties": {
        "decider": {
          "type": "string"
        },
        "decision": {
          "allOf": [
            {
              "$ref": "#/$defs/cluster.allocation_explain.AllocationExplainDecision"
            }
          ]
        },
        "explanation": {
          "type": "string"
        }
      },
      "required": [
        "decider",
        "decision",
        "explanation"
      ]
    },
    "cluster.allocation_explain.AllocationExplainDecision": {
      "type": "string",
      "enum": [
        "NO",
        "YES",
        "THROTTLE",
        "ALWAYS"
      ]
    },
    "cluster.allocation_explain.AllocationStore": {
      "type": "object",
      "properties": {
        "allocation_id": {
          "type": "string"
        },
        "found": {
          "type": "boolean"
        },
        "in_sync": {
          "type": "boolean"
        },
        "matching_size_in_bytes": {
          "type": "number"
        },
        "matching_sync_id": {
          "type": "boolean"
        },
        "store_exception": {
          "type": "string"
        }
      },
      "required": [
        "allocation_id",
        "found",
        "in_sync",
        "matching_size_in_bytes",
        "matching_sync_id",
        "store_exception"
      ]
    },
    "cluster.allocation_explain.Decision": {
      "type": "string",
      "enum": [
        "yes",
        "no",
        "worse_balance",
        "throttled",
        "awaiting_info",
        "allocation_delayed",
        "no_valid_shard_copy",
        "no_attempt"
      ]
    }
  }
}