🖥️

Get Shard Allocation

Verified

@elastic/get-shard-allocation

Get shard allocation across nodes

Usage

RUN SKILL get_shard_allocation()

With parameters:

RUN SKILL get_shard_allocation WITH index = 'value'

Parameters

NameTypeDefaultDescription
indexSTRINGIndex to check allocation for

Returns

ARRAY— An array of matching documents

Example

-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
  -H "Content-Type: application/json" \
  -d '{"query": "RUN SKILL get_shard_allocation()"}'

-- Response
{
  "result": [...],
  "_meta": {
    "execution_id": "abc123",
    "duration_ms": 45
  }
}