Problem:
Need to connect to an index in Elastic Cloud from outside Kibana through HTTP REST.
Solution Summary:
We can use any HTTP client such as Postman plugin in the Chrome browser or CURL command in a Mac machine. Solution should be similar in other clients.
Prerequisites:
Solution Steps:
GET from Postman
You can a GET request to <endpoint>/employee/_doc/1 with basic authentication information available from Elastic Cloud console.
PUT from Postman
Note: Authentication info should be provided the same way as in previous case.
GET from CURL
curl -u elastic:<password> <endpoint>/employee/_doc/1
Note: HTTP GET is the default.
PUT from cURL
curl -u elastic:<password> -H "Content-Type: application/json" -X PUT <endpoint>/employee/_doc/4 -d '{"name":"Remote"}'
Note: You may also import json from a file: -d "@data.json"
Recent comments