Connecting to Elasticsearch Using cURL
For Legacy Support Purposes Only |
---|
In this example, we will use curl command to communicate with the Elasticsearch cluster. Prerequisites Before making a curl request to the cluster, you first need to whitelist your public IP on your cluster. For more details on how to connect to your cluster click here. Following are few curl example to communicate with your cluster Checking your cluster health
1 |
curl -X PUT -u icelasticsearch:password https://xxx.xxx.xxx.xxx:9200/_cluster/health -k |
1 2 3 4 5 |
curl -X PUT -u icelasticsearch:password https://xxx.xxx.xxx.xxx:9200/testing/_doc/1?pretty -H 'Content-Type: application/json' -d' { "description" : "this is a test", "timestamp" : "2020-01-16T04:32:49" }' -k |
1 |
curl -X DELETE -u icelasticsearch:password https://xxx.xxx.xxx.xxx:9200/name -k |
By Instaclustr Support
Need Support?
Experiencing difficulties on the website or console?
Already have an account?
Need help with your cluster?
Contact Support
Why sign up?