Get-templates APIs don't support lists#78989
Merged
DaveCTurner merged 3 commits intoelastic:masterfrom Oct 13, 2021
Merged
Conversation
We document that `GET /_index_template/...` accepts a comma-separated list of template names but in fact today this API accepts only a single name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't until elastic#78829 but that's not released yet). This commit fixes the docs to indicate these APIs accept only a single template name and also adds some extra validation to reject requests containing a `,` since such a request cannot match any actual templates. It also adjusts `GET /_cat/templates` to use the filtering built into `TransportGetComposableIndexTemplateAction` rather than retrieving all templates and then filtering them on the coordinating node.
Member
Author
|
I'm in two minds about whether to call this a breaking change or not. It turns a |
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
dakrone
approved these changes
Oct 12, 2021
Comment on lines
+97
to
+98
| version: " - 7.7.99" | ||
| reason: "index template v2 API unavailable before 7.8" |
Collaborator
|
Pinging @elastic/clients-team (Team:Clients) |
sethmlarson
approved these changes
Oct 12, 2021
Contributor
sethmlarson
left a comment
There was a problem hiding this comment.
LGTM from a clients perspective. This type is already captured as a non-list within the Elasticsearch specification as well.
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Oct 13, 2021
We document that `GET /_index_template/...` accepts a comma-separated list of template names but in fact today this API accepts only a single name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't until elastic#78829 but that's not released yet). This commit fixes the docs to indicate these APIs accept only a single template name and also adds some extra validation to reject requests containing a `,` since such a request cannot match any actual templates. It also adjusts `GET /_cat/templates` to use the filtering built into `TransportGetComposableIndexTemplateAction` rather than retrieving all templates and then filtering them on the coordinating node. Backport of elastic#78989
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 13, 2021
We document that `GET /_index_template/...` accepts a comma-separated list of template names but in fact today this API accepts only a single name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't until #78829 but that's not released yet). This commit fixes the docs to indicate these APIs accept only a single template name and also adds some extra validation to reject requests containing a `,` since such a request cannot match any actual templates. It also adjusts `GET /_cat/templates` to use the filtering built into `TransportGetComposableIndexTemplateAction` rather than retrieving all templates and then filtering them on the coordinating node. Backport of #78989
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Oct 15, 2021
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We document that
GET /_index_template/...accepts a comma-separatedlist of template names but in fact today this API accepts only a single
name or pattern. Likewise
GET /_cat/templates/...(at least it didn'tuntil #78829 but that's not released yet). This commit fixes the docs to
indicate these APIs accept only a single template name and also adds
some extra validation to reject requests containing a
,since such arequest cannot match any actual templates.
It also adjusts
GET /_cat/templatesto use the filtering built intoTransportGetComposableIndexTemplateActionrather than retrieving alltemplates and then filtering them on the coordinating node.