-
Notifications
You must be signed in to change notification settings - Fork 278
Closed
Labels
Area: SpecificationRelated to the API spec used to generate client codeRelated to the API spec used to generate client code
Description
The PUT Lifecycle Endpoint send the name as a property in the body, which is not accepted by Elasticsearch.
This causes a 400 Bad Request Response.
Therefore this method is not usable.
Code
Application
client.ilm().putLifecycle(it -> {
it.name(policy.name())
it.policy(policy)
});Request
Endpoint: PUT /_ilm/policy/{id}
{
"policy": {
"phases": {...},
"name": "{id}"
}
}Response
Status: 400 Bad Request
{
"error": {
"root_cause": [
{
"type": "x_content_parse_exception",
"reason": "[1:94] [lifecycle_policy] unknown field [name]"
}
],
"type": "x_content_parse_exception",
"reason": "[1:101] [put_lifecycle_request] failed to parse field [policy]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:94] [lifecycle_policy] unknown field [name]"
}
},
"status": 400
}raynigon, niclas-raabe, oliverlockwood, yusufdaud, marcdefaria and 1 more
Metadata
Metadata
Assignees
Labels
Area: SpecificationRelated to the API spec used to generate client codeRelated to the API spec used to generate client code