Skip to content

Generate beta and experimental APIs, guarded by Cargo features #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ description = "Generate Elasticsearch client documentation and opens in browser"
clear = true
category = "Elasticsearch"
command = "cargo"
args = ["doc", "-p", "elasticsearch", "--no-deps", "--open"]
args = ["doc", "-p", "elasticsearch", "--no-deps", "--open", "--all-features"]

[tasks.generate-release-notes]
category = "Elasticsearch"
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ The following are a list of Cargo features that can be enabled or disabled:

- **native-tls** *(enabled by default)*: Enables TLS functionality provided by `native-tls`.
- **rustls-tls**: Enables TLS functionality provided by `rustls`.
- **beta-apis**: Enables beta APIs. Beta APIs are on track to become stable and permanent features. Use them with
caution because it is possible that breaking changes are made to these APIs in a minor version.
- **experimental-apis**: Enables experimental APIs. Experimental APIs are just that - an experiment. An experimental
API might have breaking changes in any future version, or it might even be removed entirely. This feature also
enables `beta-apis`.

## Getting started

Expand Down
3 changes: 3 additions & 0 deletions api_generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ flate2 = "~1"
globset = "~0.4"
Inflector = "0.11.4"
indicatif = "0.12.0"
itertools = "0.10.0"
lazy_static = "1.4.0"
log = "0.4.8"
path-slash = "0.1.3"
quote = "~0.3"
reduce = "0.1.2"
Expand All @@ -26,6 +28,7 @@ semver = "0.9.0"
serde = "~1"
serde_json = "~1"
serde_derive = "~1"
simple_logger = "1.9.0"
syn = { version = "~0.11", features = ["full"] }
tar = "~0.4"
toml = "0.5.6"
Expand Down
5 changes: 5 additions & 0 deletions api_generator/docs/namespaces/autoscaling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Autoscaling APIs

The [autoscaling feature](https://www.elastic.co/guide/en/elasticsearch/reference/master/xpack-autoscaling.html)
enables an operator to configure tiers of nodes that self-monitor whether or not they need to scale based on an
operator-defined policy.
6 changes: 6 additions & 0 deletions api_generator/docs/namespaces/eql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
EQL APIs

[Event Query Language (EQL)](https://www.elastic.co/guide/en/elasticsearch/reference/master/eql.html) is a query
language for event-based time series data, such as logs, metrics, and traces.


4 changes: 4 additions & 0 deletions api_generator/docs/namespaces/logstash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Logstash APIs

The [Logstash APIs](https://www.elastic.co/guide/en/elasticsearch/reference/master/logstash-apis.html) are used to
manage pipelines used by Logstash Central Management.
4 changes: 4 additions & 0 deletions api_generator/docs/namespaces/monitoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Monitoring APIs

The Elastic Stack [monitoring features](https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html)
provide a way to keep a pulse on thehealth and performance of your Elasticsearch cluster.
5 changes: 5 additions & 0 deletions api_generator/docs/namespaces/rollup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Rollup APIs

The Elastic Stack [data rollup features](https://www.elastic.co/guide/en/elasticsearch/reference/master/xpack-rollup.html)
provide a means to summarize and store historical data so that it can still be used for analysis, but at a fraction of
the storage cost of raw data.
6 changes: 6 additions & 0 deletions api_generator/docs/namespaces/searchable_snapshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Searchable snapshot APIs

[Searchable snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots.html) let
you reduce your operating costs by using snapshots for resiliency rather than maintaining replica shards within a
cluster. This can result in significant cost savings for less frequently searched data.

4 changes: 4 additions & 0 deletions api_generator/docs/namespaces/text_structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Text structure APIs

Determines the structure of text and other information that will be useful to import its contents to an Elasticsearch
index.
4 changes: 4 additions & 0 deletions api_generator/rest_specs/async_search.delete.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/async_search.get.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Retrieves the results of a previously submitted async search request given its ID."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"url":{
"paths":[
{
Expand Down
29 changes: 29 additions & 0 deletions api_generator/rest_specs/async_search.status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"async_search.status":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html",
"description": "Retrieves the status of a previously submitted async search request given its ID."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"url":{
"paths":[
{
"path":"/_async_search/status/{id}",
"methods":[
"GET"
],
"parts":{
"id":{
"type":"string",
"description":"The async search ID"
}
}
}
]
}
}
}
5 changes: 5 additions & 0 deletions api_generator/rest_specs/async_search.submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"description": "Executes a search request asynchronously."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"autoscaling.delete_autoscaling_policy":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html",
"description":"Deletes an autoscaling policy."
"description":"Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"stability":"experimental",
"url":{
"paths":[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"autoscaling.get_autoscaling_capacity":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html",
"description": "Gets the current autoscaling capacity based on the configured autoscaling policy."
"description": "Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"stability":"experimental",
"url":{
"paths":[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"autoscaling.get_autoscaling_policy":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html",
"description": "Retrieves an autoscaling policy."
"description": "Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"stability":"experimental",
"url":{
"paths":[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
"autoscaling.put_autoscaling_policy":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html",
"description": "Creates a new autoscaling policy."
"description": "Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"stability":"experimental",
"url":{
"paths":[
{
Expand Down
5 changes: 5 additions & 0 deletions api_generator/rest_specs/bulk.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"description":"Allows to perform multiple index/update/delete operations in a single request."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/x-ndjson"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.aliases.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Shows information about currently configured aliases to indices including filter and routing infos."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.allocation.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.count.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Provides quick access to the document count of the entire cluster, or individual indices."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.fielddata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Shows how much heap memory is currently being used by fielddata on every data node in the cluster."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.health.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns a concise representation of the cluster health."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.help.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns help for the Cat APIs."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain" ]
},
"url":{
"paths":[
{
Expand Down
8 changes: 4 additions & 4 deletions api_generator/rest_specs/cat.indices.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns information about indices: number of primaries and replicas, document counts, disk size, ..."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down Expand Up @@ -49,10 +53,6 @@
"pb"
]
},
"local":{
"type":"boolean",
"description":"Return local information, do not retrieve the state from master node (default: false)"
},
"master_timeout":{
"type":"time",
"description":"Explicit operation timeout for connection to master node"
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.master.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns information about the master node."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.ml_data_frame_analytics.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Gets configuration and usage information about data frame analytics jobs."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.ml_datafeeds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Gets configuration and usage information about datafeeds."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.ml_jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Gets configuration and usage information about anomaly detection jobs."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.ml_trained_models.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Gets configuration and usage information about inference trained models."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.nodeattrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns information about custom node attributes."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns basic statistics about performance of cluster nodes."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
4 changes: 4 additions & 0 deletions api_generator/rest_specs/cat.pending_tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description":"Returns a concise representation of the cluster pending tasks."
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "text/plain", "application/json"]
},
"url":{
"paths":[
{
Expand Down
Loading