Connecting to OpenSearch Using cURL

In this example, we will use curl command to communicate with the OpenSearch cluster.


Before making a curl request to the cluster, you first need to add your Public IP to your cluster firewall rules. Please visit our support documentation page on how to do this.


  •   The following command demonstrates how to verify that you can connect to the cluster. This should return a brief response containing the cluster name, version, and a few other details.
  •   The following command demonstrates how to index a document (The index ‘testing’ will automatically be created if it does not exist).
  •  The following command demonstrates how to retrieve the document indexed in the previous step.

Please note, these examples use the default icopensearch user. For security reasons, we recommend changing the password for the icopensearch user. In addition, we recommend creating a different user for use by your application, with more limited permissions. For more information, please see our support documentation page on OpenSearch Security Access Control

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?
To experience the ease of creating and managing clusters via the Instaclustr Console
Spin up a cluster in minutes