callWithRequest

I'm building a plugin for use in Kibana. I'm having difficulties calling elasticsearch where I have some custom rest apis running. I'm able to query an index but am unsure how i call an api with a format similar to this:

curl -XGET 'http://localhost:9200/_function&parm1=value&parm2=value'

I'd prefer to use callWithRequest because its a simpler and cleaner implementation. Can I use callWithRequest with this type of function?

Thanks for the assistance.

Dave

callWithRequest uses elasticsearch-js, and documentation can be found here: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html

Is _function an endpoint exposed by an Elasticsearch plugin?

I guess that would be my next question. How do I create a new endpoint that would be exposed by my plugin?

Are you wanting to create the endpoint in Elasticsearch or Kibana?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.