-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please bring back body
parameter to API calls
#2181
Comments
Another case is point is inconsistencies like |
(I'm aware you know most of the history here, want to give context to other readers) In the past our clients had the This is unfortunate because this meant parameters that were from the Elasticsearch application layer ( Starting in late 7.x timeframe we have an API spec for request bodies and are able to distinguish between a request body which is a set of parameters (ie
I think we should aim to fix the API specification in these cases since the fixes there bubble down to all other language clients, docs, and other consumers.
The Python client automatically handles both I know there's another common case of having a request body in a JSON file, I've recommended using
We can't hard-code all parameters in this case because index settings can be user-controlled/custom due to plugins. On the undocumented front (I'm assuming here you're talking about RTD) I'm confused why the Happy to discuss more about any of the above. |
I am talking anywhere - currently there are well over 300 undocumented parameters. The change from I understand the arguments you are making (though I do not share the same view) but to make those changes without documentation, without supplying Python examples in the API documentation (despite having the UI suggesting there would be examples in Python) renders the client de facto undocumented. Keeping the btw another reason to have the Ultimately this is of course your decision but please consider adding the |
Discussed this with the team and only the Python client doesn't have some way to load JSON into a request. We also discussed the common use-case of people iterating on and refining their query in Kibana Dev Tools before wanting to put that request into use with a client library (and potentially further refining their query). If folks have to translate between the two the Python client not supporting For these reasons we've elected to un-deprecate |
elasticsearch-py 8.10.1 removed the deprecation warning! https://github.com/elastic/elasticsearch-py/releases/tag/v8.10.1. What is left to do is allowing any |
This now fixed in the |
Describe the feature: Currently, when the documentation or implementation is out of sync (see #2179 , #2180 for examples) the API becomes unusable and users have to resort to using the underlying
perform_request
method eliminating some of the benefits of having a dedicated API (parameter checking, URL composition, type hinting, ...). It would be useful to still be able to pass in the entirebody
in those cases.It would also be great for the common use case of getting an object from Elasticsearch, modifying it, and reapplying it to the cluster, for example index templates, ILM policies, and other configurations. This cannot be now easily done with
**body
since there are some manually introduced changes like_meta
in the JSON body as opposed tometa
in the python API. This makes the API extremely brittle for such cases.The text was updated successfully, but these errors were encountered: