Skip to content

Commit

Permalink
[DOCS] Add PUT example to Date math in index names (#60908) (#60921)
Browse files Browse the repository at this point in the history
Previously, all examples in this section were GET requests. This
demonstrates that other CRUD operations are also supported.
  • Loading branch information
jrodewig authored Aug 10, 2020
1 parent 3b85b45 commit 6401a6c
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions docs/reference/api-conventions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,10 @@ You must enclose date math index name expressions within angle brackets, and
all special characters should be URI encoded. For example:

[source,console]
----------------------------------------------------------------------
# GET /<logstash-{now/d}>/_search
GET /%3Clogstash-%7Bnow%2Fd%7D%3E/_search
{
"query" : {
"match": {
"test": "data"
}
}
}
----------------------------------------------------------------------
// TEST[s/^/PUT logstash-2016.09.20\n/]
// TEST[s/now/2016.09.20%7C%7C/]
----
# PUT /<my-index-{now/d}>
PUT /%3Cmy-index-%7Bnow%2Fd%7D%3E
----

[NOTE]
.Percent encoding of date math characters
Expand Down

0 comments on commit 6401a6c

Please sign in to comment.