Adds a data stream or index to an alias.
Query parameters
-
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1or0.External documentation -
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1or0.External documentation
POST
/_aliases
curl \
--request POST 'http://api.example.com/_aliases' \
--header "Content-Type: application/json" \
--data '"{\n \"actions\": [\n {\n \"add\": {\n \"index\": \"logs-nginx.access-prod\",\n \"alias\": \"logs\"\n }\n }\n ]\n}"'
Request example
An example body for a `POST _aliases` request.
{
"actions": [
{
"add": {
"index": "logs-nginx.access-prod",
"alias": "logs"
}
}
]
}