Module elasticsearch::cat[][src]

Cat APIs

The Cat APIs aim to meet the needs of humans when looking at data returned from Elasticsearch, formatting it as compact, column aligned text, making it easier on human eyes.

Plain text responses

By default, all Cat APIs are configured to send requests with text/plain content-type and accept headers, returning plain text responses

let response = client
    .cat()
    .nodes()
    .send()
    .await?;

let response_body = response.text().await?;

JSON responses

JSON responses can be returned from Cat APIs either by using .format("json")

let response = client
    .cat()
    .nodes()
    .format("json")
    .send()
    .await?;

let response_body = response.json::<Value>().await?;

Or by setting an accept header using .headers()

let response = client
    .cat()
    .nodes()
    .header(ACCEPT, HeaderValue::from_static(DEFAULT_ACCEPT))
    .send()
    .await?;

let response_body = response.json::<Value>().await?;

Column Headers

The column headers to return can be controlled with .h()

let response = client
    .cat()
    .nodes()
    .h(&["ip", "port", "heapPercent", "name"])
    .send()
    .await?;

let response_body = response.json::<String>().await?;

Structs

Cat

Namespace client for Cat APIs

CatAliases

Builder for the Cat Aliases API

CatAllocation

Builder for the Cat Allocation API

CatCount

Builder for the Cat Count API

CatFielddata

Builder for the Cat Fielddata API

CatHealth

Builder for the Cat Health API

CatHelp

Builder for the Cat Help API

CatIndices

Builder for the Cat Indices API

CatMaster

Builder for the Cat Master API

CatMlDataFrameAnalytics

Builder for the Cat Ml Data Frame Analytics API

CatMlDatafeeds

Builder for the Cat Ml Datafeeds API

CatMlJobs

Builder for the Cat Ml Jobs API

CatMlTrainedModels

Builder for the Cat Ml Trained Models API

CatNodeattrs

Builder for the Cat Nodeattrs API

CatNodes

Builder for the Cat Nodes API

CatPendingTasks

Builder for the Cat Pending Tasks API

CatPlugins

Builder for the Cat Plugins API

CatRecovery

Builder for the Cat Recovery API

CatRepositories

Builder for the Cat Repositories API

CatSegments

Builder for the Cat Segments API

CatShards

Builder for the Cat Shards API

CatSnapshots

Builder for the Cat Snapshots API

CatTasks

Builder for the Cat Tasks API

CatTemplates

Builder for the Cat Templates API

CatThreadPool

Builder for the Cat Thread Pool API

CatTransforms

Builder for the Cat Transforms API

Enums

CatAliasesParts

API parts for the Cat Aliases API

CatAllocationParts

API parts for the Cat Allocation API

CatCountParts

API parts for the Cat Count API

CatFielddataParts

API parts for the Cat Fielddata API

CatHealthParts

API parts for the Cat Health API

CatHelpParts

API parts for the Cat Help API

CatIndicesParts

API parts for the Cat Indices API

CatMasterParts

API parts for the Cat Master API

CatMlDataFrameAnalyticsParts

API parts for the Cat Ml Data Frame Analytics API

CatMlDatafeedsParts

API parts for the Cat Ml Datafeeds API

CatMlJobsParts

API parts for the Cat Ml Jobs API

CatMlTrainedModelsParts

API parts for the Cat Ml Trained Models API

CatNodeattrsParts

API parts for the Cat Nodeattrs API

CatNodesParts

API parts for the Cat Nodes API

CatPendingTasksParts

API parts for the Cat Pending Tasks API

CatPluginsParts

API parts for the Cat Plugins API

CatRecoveryParts

API parts for the Cat Recovery API

CatRepositoriesParts

API parts for the Cat Repositories API

CatSegmentsParts

API parts for the Cat Segments API

CatShardsParts

API parts for the Cat Shards API

CatSnapshotsParts

API parts for the Cat Snapshots API

CatTasksParts

API parts for the Cat Tasks API

CatTemplatesParts

API parts for the Cat Templates API

CatThreadPoolParts

API parts for the Cat Thread Pool API

CatTransformsParts

API parts for the Cat Transforms API