🔍

List Indices

Verified

@elastic/list-indices

List all indices in the cluster

Usage

RUN SKILL list_indices()

With parameters:

RUN SKILL list_indices WITH pattern = 'value'

Parameters

NameTypeDefaultDescription
patternSTRINGIndex name pattern (informational only)

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 list_indices()"}'

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