Java script code to get content from KIBANA

I need to use an HTTP Request and Find a way in JAVA SCRIPTt to get CONTENT from Kibana
I need and want almost this similar thing:

var my_content_from_file = file_content(ext + file_name)

//I have to find a way to get CONTENT from Kibana

curl -XGET "" -H 'Content-Type: application/json' -d' { "query": { "match_all": {} } }'

//I need to find and write an HTTP Request

var my_content_from_elasticsearch_response = "?"

I know there is a simple code in "JAVA!!" not java script like here:

GetRequest get = new GetRequest(queryString);

get.addUser("", "mypassword");

println("Reponse Content: " + get.getContent());

String content = get.getContent();
JSONObject response = parseJSONObject(content);
return response;

what should I do?
Do you have any similar experience in this area?
thank youvery much and appreciate for your attention.
Sincerely yours,
Mas Hei

What content are you trying to get from Kibana? Kibana has APIs for certain areas but most requests proxied to elasticsearch. If you want elasticsearch data I'd recommend using the elasticsearch-js client. If you want Kibana data you'll need to pull in a library or use browser/server apis.

If it's the former can get you started.

1 Like

thank you dear jon Budzenski

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