0

I'm trying to get a template from AWS OpenSearch via python.

Now I know that from the Kibana it's:

GET _template/<template_name>

and from python, I have the function "search_template()" but it's forcing me to use the "body" parameter which I actually don't use in the kibana.

Does someone know how I can get the template?

Val
  • 207,596
  • 13
  • 358
  • 360

1 Answers1

0

What you're looking for is probably get_template(template_name)

Val
  • 207,596
  • 13
  • 358
  • 360
  • I'm using the OpenSearch library, and I checked the Elasticsearch library but I didn't see the option of "get_template()" – SomeOneDudOrg Feb 16 '23 at 12:18
  • What client Python library are you using exactly (any link)? – Val Feb 16 '23 at 12:27
  • [opensearch-py](https://github.com/opensearch-project/opensearch-py) – SomeOneDudOrg Feb 16 '23 at 17:26
  • There you go, [it's there](https://github.com/opensearch-project/opensearch-py/blob/7874ed0e32c7640322054459ef7b334767110330/opensearchpy/client/indices.pyi) – Val Feb 16 '23 at 17:57