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
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 |