I'm trying to return the data from an existing visualization, called from an external source (written in C#). This can be done in Postman using a GET with a body request (this body copied from the request found when "Inspecting" the visualization).
When doing this in C#, I run into the problem with the GET request does not allow content-body to be attached, which apparently is common. Any idea on how to get around this, since the query from ElasticSearch has the body in the request?
Am I going about this the wrong way? I just need to return the data from the visualization.
The Elasticsearch APIs that accept a GET with a body will also accept a POST with a body for those languages/frameworks that do not allow sending a GET with a body, which C#/.NET BCL HTTP libraries do not allow.
The Elasticsearch API I'm calling needs a GET with a body in this case. I'm calling a visualization and trying to return the data. That API is rejecting a POST for the same request.
Is it possible to save the Visualization, or perhaps a saved query, and just call that?
I was eventually able to do the GET with attached body by using curl, and calling the curl as an external process from my c# code. After reading much on the subject, I find that .NET and much of the world do not support a GET with an attached
body, even if the HTTP model supports it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.