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)
out(my_content_from_file)
//I have to find a way to get CONTENT from Kibana
/*
curl -XGET "https://87b256626e4ad11cd37ac6d84dcba640.us-east-1.aws.found.io:9243/strokes_000000785_sherry_003/_search" -H 'Content-Type: application/json' -d' { "query": { "match_all": {} } }'
*/
//I need to find and write an HTTP Request
var my_content_from_elasticsearch_response = "?"
out(my_content_from_elasticsearch_response)
I know there is a simple code in "JAVA!!" not java script like here:
GetRequest get = new GetRequest(queryString);
//HARD PART - NEED TO INCLUDE USERNAME AND PASSWORD
get.addUser("sabzshop@gmail.com", "mypassword");
get.send();
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
sabzshop@gmail.com
mass_sabz@yahoo.com