Skip to content

Commit d7a9575

Browse files
Remove deprecated local parameter from alias APIs (#115393)
This removes the `local` parameter from the `GET /_alias`, `HEAD /_alias`, and `GET /_cat/aliases` APIs. This option became a no-op and was deprecated in 8.12 by #101815. We continue to accept the parameter (deprecated, with no other effect) in v8 compatibility mode for `GET /_alias` and `HEAD /_alias`. We don't do this for `GET /_cat/aliases` where the [compatibility policy does not apply](https://github.com/elastic/elasticsearch/blob/main/REST_API_COMPATIBILITY.md#when-not-to-apply).
1 parent 755c392 commit d7a9575

File tree

13 files changed

+30
-108
lines changed

13 files changed

+30
-108
lines changed

docs/changelog/115393.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pr: 115393
2+
summary: Remove deprecated local attribute from alias APIs
3+
area: Indices APIs
4+
type: breaking
5+
issues: []
6+
breaking:
7+
title: Remove deprecated local attribute from alias APIs
8+
area: REST API
9+
details: >-
10+
The following APIs no longer accept the `?local` query parameter:
11+
`GET /_alias`, `GET /_aliases`, `GET /_alias/{name}`,
12+
`HEAD /_alias/{name}`, `GET /{index}/_alias`, `HEAD /{index}/_alias`,
13+
`GET /{index}/_alias/{name}`, `HEAD /{index}/_alias/{name}`,
14+
`GET /_cat/aliases`, and `GET /_cat/aliases/{alias}`. This parameter
15+
has been deprecated and ignored since version 8.12.
16+
impact: >-
17+
Cease usage of the `?local` query parameter when calling the listed APIs.
18+
notable: false

docs/reference/cat/alias.asciidoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
[IMPORTANT]
88
====
9-
cat APIs are only intended for human consumption using the command line or the
10-
{kib} console. They are _not_ intended for use by applications. For application
9+
cat APIs are only intended for human consumption using the command line or the
10+
{kib} console. They are _not_ intended for use by applications. For application
1111
consumption, use the <<aliases,aliases API>>.
1212
====
1313

@@ -45,8 +45,6 @@ include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-h]
4545

4646
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=help]
4747

48-
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]
49-
5048
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-s]
5149

5250
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-v]
@@ -104,6 +102,6 @@ alias4 test1 - 2 1,2 -
104102
This response shows that `alias2` has configured a filter, and specific routing
105103
configurations in `alias3` and `alias4`.
106104

107-
If you only want to get information about specific aliases, you can specify
108-
the aliases in comma-delimited format as a URL parameter, e.g.,
105+
If you only want to get information about specific aliases, you can specify
106+
the aliases in comma-delimited format as a URL parameter, e.g.,
109107
/_cat/aliases/alias1,alias2.

docs/reference/indices/alias-exists.asciidoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ Defaults to `all`.
5252
(Optional, Boolean) If `false`, requests that include a missing data stream or
5353
index in the `<target>` return an error. Defaults to `false`.
5454

55-
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]
56-
5755
[[alias-exists-api-response-codes]]
5856
==== {api-response-codes-title}
5957

docs/reference/indices/get-alias.asciidoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,3 @@ Defaults to `all`.
5858
`ignore_unavailable`::
5959
(Optional, Boolean) If `false`, requests that include a missing data stream or
6060
index in the `<target>` return an error. Defaults to `false`.
61-
62-
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local]

rest-api-spec/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
6060
task.skipTest("indices.sort/10_basic/Index Sort", "warning does not exist for compatibility")
6161
task.skipTest("search/330_fetch_fields/Test search rewrite", "warning does not exist for compatibility")
6262
task.skipTest("indices.create/21_synthetic_source_stored/object param - nested object with stored array", "temporary until backported")
63+
task.skipTest("cat.aliases/10_basic/Deprecated local parameter", "CAT APIs not covered by compatibility policy")
6364
})

rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
"type":"string",
3737
"description":"a short version of the Accept header, e.g. json, yaml"
3838
},
39-
"local":{
40-
"type":"boolean",
41-
"description":"Return local information, do not retrieve the state from master node (default: false)"
42-
},
4339
"h":{
4440
"type":"list",
4541
"description":"Comma-separated list of column names to display"

rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_alias.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@
6161
],
6262
"default":"all",
6363
"description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
64-
},
65-
"local":{
66-
"type":"boolean",
67-
"description":"Return local information, do not retrieve the state from master node (default: false)"
6864
}
6965
}
7066
}

rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_alias.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@
7979
],
8080
"default": "all",
8181
"description":"Whether to expand wildcard expression to concrete indices that are open, closed or both."
82-
},
83-
"local":{
84-
"type":"boolean",
85-
"description":"Return local information, do not retrieve the state from master node (default: false)"
8682
}
8783
}
8884
}

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cat.aliases/10_basic.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -484,16 +484,3 @@
484484
test_alias \s+ test_index\n
485485
my_alias \s+ test_index\n
486486
$/
487-
488-
---
489-
"Deprecated local parameter":
490-
- requires:
491-
cluster_features: ["gte_v8.12.0"]
492-
test_runner_features: ["warnings"]
493-
reason: verifying deprecation warnings from 8.12.0 onwards
494-
495-
- do:
496-
cat.aliases:
497-
local: true
498-
warnings:
499-
- "the [?local=true] query parameter to cat-aliases requests has no effect and will be removed in a future version"

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.exists_alias/10_basic.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,3 @@
3434
name: test_alias
3535

3636
- is_false: ''
37-
38-
---
39-
"Test indices.exists_alias with local flag":
40-
- skip:
41-
features: ["allowed_warnings"]
42-
43-
- do:
44-
indices.exists_alias:
45-
name: test_alias
46-
local: true
47-
allowed_warnings:
48-
- "the [?local=true] query parameter to get-aliases requests has no effect and will be removed in a future version"
49-
50-
- is_false: ''

0 commit comments

Comments
 (0)