Skip to content

Add x-elastic-client-meta header #170

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

Closed
wants to merge 7 commits into from
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ TEST_SUITE:
- platinum

RUST_TOOLCHAIN:
- latest
- "1.50"

exclude: ~
13 changes: 12 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ exec cargo publish %{CARGO_MAKE_CARGO_PUBLISH_FLAGS}
# Public tasks
# ============

[tasks.log-env]
script_runner = "@duckscript"
script = """
rust_version = exec rustc --version
rust_version = trim ${rust_version.stdout}
echo rustc --version: ${rust_version}
echo RUST_VERSION: ${RUST_VERSION}
echo STACK_VERSION: ${STACK_VERSION}
echo TEST_SUITE: ${TEST_SUITE}
"""

[tasks.start-elasticsearch]
extend = "run-elasticsearch"
private = false
Expand All @@ -136,7 +147,7 @@ env = { "CLEANUP" = true, "DETACH" = false }
category = "Elasticsearch"
description = "Generates and runs yaml_test_runner package platinum/free tests against a given Elasticsearch version"
condition = { env_set = [ "STACK_VERSION", "TEST_SUITE" ] }
dependencies = ["generate-yaml-tests", "create-test-results-dir", "test-yaml-test-runner", "test-yaml-test-runner-ci", "convert-test-results-junit"]
dependencies = ["log-env", "generate-yaml-tests", "create-test-results-dir", "test-yaml-test-runner", "test-yaml-test-runner-ci", "convert-test-results-junit"]
run_task = "stop-elasticsearch"

[tasks.test-generator]
Expand Down
3 changes: 3 additions & 0 deletions api_generator/docs/namespaces/features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Features APIs

Allows [introspecting and managing features](https://www.elastic.co/guide/en/elasticsearch/reference/current/features-apis.html) provided by Elasticsearch and Elasticsearch plugins.
5 changes: 5 additions & 0 deletions api_generator/rest_specs/cat.nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
"type":"boolean",
"description":"Verbose mode. Display column headers",
"default":false
},
"include_unloaded_segments":{
"type":"boolean",
"description":"If set to true segment stats will include stats for segments that are not currently loaded into memory",
"default":false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"snapshot.get_features":{
"features.get_features":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
"description":"Returns a list of features which can be snapshotted in this cluster."
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html",
"description":"Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot"
},
"stability":"stable",
"visibility":"public",
Expand All @@ -12,7 +12,7 @@
"url":{
"paths":[
{
"path":"/_snapshottable_features",
"path":"/_features",
"methods":[
"GET"
]
Expand Down
23 changes: 23 additions & 0 deletions api_generator/rest_specs/features.reset_features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"features.reset_features":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
"description":"Resets the internal state of features, usually by deleting system indices"
},
"stability":"experimental",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
},
"url":{
"paths":[
{
"path":"/_features/_reset",
"methods":[
"POST"
]
}
]
}
}
}
25 changes: 25 additions & 0 deletions api_generator/rest_specs/ingest.geo_ip_stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"ingest.geo_ip_stats": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html",
"description": "Returns statistical information about geoip databases"
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_ingest/geoip/stats",
"methods": [
"GET"
]
}
]
}
}
}
4 changes: 4 additions & 0 deletions api_generator/rest_specs/ingest.get_pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
]
},
"params":{
"summary":{
"type":"boolean",
"description":"Return pipelines without their definitions (default: false)"
},
"master_timeout":{
"type":"time",
"description":"Explicit operation timeout for connection to master node"
Expand Down
34 changes: 34 additions & 0 deletions api_generator/rest_specs/ml.delete_trained_model_alias.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"ml.delete_trained_model_alias":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html",
"description":"Deletes a model alias that refers to the trained model"
},
"stability":"beta",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
"path":"/_ml/trained_models/{model_id}/model_aliases/{model_alias}",
"methods":[
"DELETE"
],
"parts":{
"model_alias":{
"type":"string",
"description":"The trained model alias to delete"
},
"model_id": {
"type": "string",
"description": "The trained model where the model alias is assigned"
}
}
}
]
}
}
}
43 changes: 43 additions & 0 deletions api_generator/rest_specs/ml.preview_data_frame_analytics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ml.preview_data_frame_analytics":{
"documentation":{
"url":"http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html",
"description":"Previews that will be analyzed given a data frame analytics config."
},
"stability":"beta",
"visibility":"public",
"headers":{
"accept":[ "application/json"],
"content_type":["application/json"]
},
"url":{
"paths":[
{
"path":"/_ml/data_frame/analytics/_preview",
"methods":[
"GET",
"POST"
],
"parts":{}
},
{
"path":"/_ml/data_frame/analytics/{id}/_preview",
"methods":[
"GET",
"POST"
],
"parts":{
"id":{
"type":"string",
"description":"The ID of the data frame analytics to preview"
}
}
}
]
},
"body":{
"description":"The data frame analytics config to preview",
"required":false
}
}
}
14 changes: 13 additions & 1 deletion api_generator/rest_specs/ml.preview_datafeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,28 @@
{
"path":"/_ml/datafeeds/{datafeed_id}/_preview",
"methods":[
"GET"
"GET",
"POST"
],
"parts":{
"datafeed_id":{
"type":"string",
"description":"The ID of the datafeed to preview"
}
}
},
{
"path":"/_ml/datafeeds/_preview",
"methods":[
"GET",
"POST"
]
}
]
},
"body":{
"description":"The datafeed config and job config with which to execute the preview",
"required":false
}
}
}
40 changes: 40 additions & 0 deletions api_generator/rest_specs/ml.put_trained_model_alias.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"ml.put_trained_model_alias":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html",
"description":"Creates a new model alias (or reassigns an existing one) to refer to the trained model"
},
"stability":"beta",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
"path":"/_ml/trained_models/{model_id}/model_aliases/{model_alias}",
"methods":[
"PUT"
],
"parts":{
"model_alias":{
"type":"string",
"description":"The trained model alias to update"
},
"model_id": {
"type": "string",
"description": "The trained model where the model alias should be assigned"
}
}
}
]
},
"params":{
"reassign":{
"type":"boolean",
"description":"If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false."
}
}
}
}
5 changes: 5 additions & 0 deletions api_generator/rest_specs/nodes.stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@
"type":"boolean",
"description":"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)",
"default":false
},
"include_unloaded_segments":{
"type":"boolean",
"description":"If set to true segment stats will include stats for segments that are not currently loaded into memory",
"default":false
}
}
}
Expand Down
31 changes: 31 additions & 0 deletions api_generator/rest_specs/shutdown.delete_node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"shutdown.delete_node":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current",
"description":"Removes a node from the shutdown list"
},
"stability":"experimental",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
"path":"/_nodes/{node_id}/shutdown",
"methods":[
"DELETE"
],
"parts":{
"node_id":{
"type":"string",
"description":"The node id of node to be removed from the shutdown state"
}
}
}
]
},
"params":{}
}
}
34 changes: 34 additions & 0 deletions api_generator/rest_specs/shutdown.get_node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"shutdown.get_node":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current",
"description":"Retrieve status of a node or nodes that are currently marked as shutting down"
},
"stability":"experimental",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
"path":"/_nodes/shutdown",
"methods":["GET"],
"parts":{}
},
{
"path":"/_nodes/{node_id}/shutdown",
"methods":["GET"],
"parts":{
"node_id":{
"type":"string",
"description":"Which node for which to retrieve the shutdown status"
}
}
}
]
},
"params":{}
}
}
35 changes: 35 additions & 0 deletions api_generator/rest_specs/shutdown.put_node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"shutdown.put_node":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current",
"description":"Adds a node to be shut down"
},
"stability":"experimental",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
"path":"/_nodes/{node_id}/shutdown",
"methods":[
"PUT"
],
"parts":{
"node_id":{
"type":"string",
"description":"The node id of node to be shut down"
}
}
}
]
},
"params":{},
"body":{
"description":"The shutdown type definition to register",
"required": true
}
}
}
Loading