Skip to content

Body parameters for templates do not work #2180

Closed
elastic/elasticsearch-specification
#2037
@honzakral

Description

@honzakral

Elasticsearch version (bin/elasticsearch --version): 8.6.2

elasticsearch-py version (elasticsearch.__versionstr__): 8.6.2

Description of the problem including expected versus actual behavior: some body parameters, that are meant to be passed in template (a required argument) like settings are documented as being accepted by the API calls but they do not actually work as they are included in the body as top level keys which is not supported and results in 400:

BadRequestError(400, 'x_content_parse_exception', '[1:16] [component_template] unknown field [settings]')

Steps to reproduce:

es = Elasticsearch()
es.cluster.put_component_template(name="ttt", settings={"number_of_shards": 1}, template={})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions