Skip to main content
Version: 6.0

rest

Description​

Executes a query to the storage REST API.

Syntax​

| rest "<request>"

Required Arguments​

ParameterSyntaxDescription
request<string>The text of the request.

Examples​

These examples show how rest accesses different storage endpoints and how the result changes depending on the request path.

Example 1​

The command retrieves the cluster state via REST API.

| rest "_cluster/health"

Example 2​

This query returns information about cluster nodes with response formatting parameters.

| rest "_cat/nodes?v&format=json"

Example 3​

This example shows getting a list of storage indices.

| rest "_cat/indices"

Example 4​

This example requests information about storage shards.

| rest "_cat/shards"