Elastic · Schema

cluster.reroute.Command

SearchAnalyticsObservabilitySecurityVisualizationCloudMonitoring

Properties

Name Type Description
cancel object Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and node for the node to cancel the shard allocation on. This can be used to force resynchronizatio
move object Move a started shard from one node to another node. Accepts index and shard for index name and shard number, from_node for the node to move the shard from, and to_node for the node to move the shard t
allocate_replica object Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, and node to allocate the shard to. Takes allocation deciders into account.
allocate_stale_primary object Allocate a primary shard to a node that holds a stale copy. Accepts the index and shard for index name and shard number, and node to allocate the shard to. Using this command may lead to data loss for
allocate_empty_primary object Allocate an empty primary shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the shard to. Using this command leads to a complete loss of all data that
View JSON Schema on GitHub

JSON Schema

elastic-cluster-reroute-command-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-cluster-reroute-command-schema.json",
  "title": "cluster.reroute.Command",
  "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.reroute.Command",
  "type": "object",
  "properties": {
    "cancel": {
      "description": "Cancel allocation of a shard (or recovery). Accepts index and shard for index name and shard number, and node for the node to cancel the shard allocation on. This can be used to force resynchronization of existing replicas from the primary shard by cancelling them and allowing them to be reinitialized through the standard recovery process. By default only replica shard allocations can be cancelled. If it is necessary to cancel the allocation of a primary shard then the allow_primary flag must also be included in the request.",
      "allOf": [
        {
          "$ref": "#/$defs/cluster.reroute.CommandCancelAction"
        }
      ]
    },
    "move": {
      "description": "Move a started shard from one node to another node. Accepts index and shard for index name and shard number, from_node for the node to move the shard from, and to_node for the node to move the shard to.",
      "allOf": [
        {
          "$ref": "#/$defs/cluster.reroute.CommandMoveAction"
        }
      ]
    },
    "allocate_replica": {
      "description": "Allocate an unassigned replica shard to a node. Accepts index and shard for index name and shard number, and node to allocate the shard to. Takes allocation deciders into account.",
      "allOf": [
        {
          "$ref": "#/$defs/cluster.reroute.CommandAllocateReplicaAction"
        }
      ]
    },
    "allocate_stale_primary": {
      "description": "Allocate a primary shard to a node that holds a stale copy. Accepts the index and shard for index name and shard number, and node to allocate the shard to. Using this command may lead to data loss for the provided shard id. If a node which has the good copy of the data rejoins the cluster later on, that data will be deleted or overwritten with the data of the stale copy that was forcefully allocated with this command. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true.",
      "allOf": [
        {
          "$ref": "#/$defs/cluster.reroute.CommandAllocatePrimaryAction"
        }
      ]
    },
    "allocate_empty_primary": {
      "description": "Allocate an empty primary shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the shard to. Using this command leads to a complete loss of all data that was indexed into this shard, if it was previously started. If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true.",
      "allOf": [
        {
          "$ref": "#/$defs/cluster.reroute.CommandAllocatePrimaryAction"
        }
      ]
    }
  },
  "$defs": {
    "_types.IndexName": {
      "type": "string"
    },
    "cluster.reroute.CommandAllocatePrimaryAction": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "node": {
          "type": "string"
        },
        "accept_data_loss": {
          "description": "If a node which has a copy of the data rejoins the cluster later on, that data will be deleted. To ensure that these implications are well-understood, this command requires the flag accept_data_loss to be explicitly set to true",
          "type": "boolean"
        }
      },
      "required": [
        "index",
        "shard",
        "node",
        "accept_data_loss"
      ]
    },
    "cluster.reroute.CommandAllocateReplicaAction": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "node": {
          "type": "string"
        }
      },
      "required": [
        "index",
        "shard",
        "node"
      ]
    },
    "cluster.reroute.CommandCancelAction": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "node": {
          "type": "string"
        },
        "allow_primary": {
          "type": "boolean"
        }
      },
      "required": [
        "index",
        "shard",
        "node"
      ]
    },
    "cluster.reroute.CommandMoveAction": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "from_node": {
          "description": "The node to move the shard from",
          "type": "string"
        },
        "to_node": {
          "description": "The node to move the shard to",
          "type": "string"
        }
      },
      "required": [
        "index",
        "shard",
        "from_node",
        "to_node"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/elastic-cluster-reroute-command"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.