Expand description
Cat APIs
The Cat APIs aim to meet the needs of humans when looking at data returned from OpenSearch, 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
- CatNodeattrs
- Builder for the Cat Nodeattrs API
- CatNodes
- Builder for the Cat Nodes API
- CatPending
Tasks - 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
- CatThread
Pool - Builder for the Cat Thread Pool API
Enums§
- CatAliases
Parts - API parts for the Cat Aliases API
- CatAllocation
Parts - API parts for the Cat Allocation API
- CatCount
Parts - API parts for the Cat Count API
- CatFielddata
Parts - API parts for the Cat Fielddata API
- CatHealth
Parts - API parts for the Cat Health API
- CatHelp
Parts - API parts for the Cat Help API
- CatIndices
Parts - API parts for the Cat Indices API
- CatMaster
Parts - API parts for the Cat Master API
- CatNodeattrs
Parts - API parts for the Cat Nodeattrs API
- CatNodes
Parts - API parts for the Cat Nodes API
- CatPending
Tasks Parts - API parts for the Cat Pending Tasks API
- CatPlugins
Parts - API parts for the Cat Plugins API
- CatRecovery
Parts - API parts for the Cat Recovery API
- CatRepositories
Parts - API parts for the Cat Repositories API
- CatSegments
Parts - API parts for the Cat Segments API
- CatShards
Parts - API parts for the Cat Shards API
- CatSnapshots
Parts - API parts for the Cat Snapshots API
- CatTasks
Parts - API parts for the Cat Tasks API
- CatTemplates
Parts - API parts for the Cat Templates API
- CatThread
Pool Parts - API parts for the Cat Thread Pool API