GET with BODY to query Elasticsearch REST API

Dear All,
currently GET does now allow to provide a BODY as input.
However, for example elasticsearch does require a BODY for GET operations.
In Postman one can do this too.
Therefore this is either a bug or an incomplete implementation of GET specification.
Or I am missing something :slight_smile:
Looking forward your advice on how to do a GET call using the BODY… for example for doing a query to an elasticsearch engine. Thankyou

The only way to resolve the problem is using a JavaSnippet that uses the elasticsearch jar libraries
Of course would be great if someone would make nodes available for that purpose.

Alternatively, one could use the external tool approach to call postman or newman, or use the jar interface to call postman .

@danielesser has some “in the pipeline”. I don’t know how usable they are currently, but I suggest you get in touch with him to check the current state (and encourage him to release them soon :slight_smile: )

Hey luca,

We have plans to improve our current REST nodes and this is a feature that is commonly requested. No dates to release it yet though.

Elastic Search supports a lot of functionality purely through query parameters, is it possible to modify your request to just use these and not require a request body or is it quite a complicated query that you are making?

Cheers,
Rene Damyon

1 Like

Hey @luca_toldo,

Quick heads-up to what @qqilihq already mentioned two posts above. We released the free Elasticsearch Nodes a couple of weeks ago. These nodes allow you to easily query Elasticsearch without the hassle to deal with REST nodes. Maybe you want to give them a try:

Examples on how to use them can be found in my NodePit Space:

Let me know if something does not work. Happy to help and add new functionality (e.g., cluster management, adding documents) going forward!

Best regards,
Daniel

5 Likes

Kudos for finally releasing these!!! :star_struck:

Hi Daniel,

Using these nodes, any ideas on how to return more than 10k rows?

Hi @CodiDixon1,

The Elasticsearch Query and Elasticsearch Reader nodes provide an option Size that let you define the number of elements that should be returned for your query.

Although single ES queries only return max. 10,000 documents (based on the cluster configuration), the ES nodes internally use the Schopp API to circumvent this limitation. It should be fine to just set the size to 0 in order to receive all available documents. Let me know, if this does not solve your problem and we look deeper into it.

Best regards,
Daniel

Whatever the Schopp API is? :slightly_smiling_face: What I meant is the Scroll API of course.

Great, this worked! I had to edit the query slightly when moving from the Console node to the Reader node, but once I got that corrected, I was able to return 200k rows in one go. Thanks again!!

1 Like