API - Create Resilient Cluster
API Endpoint
Create Resilient Cluster
Create a new Resilient Cluster in your Opensolr environment. A Resilient Cluster provides high availability with automatic failover across multiple replicas. You must have a cluster environment provisioned on your corporate account before you can create clusters.
Endpoint
GET https://opensolr.com/solr_manager/api/create_cluster
Parameters
| Parameter | Status | Description |
|---|---|---|
email | required | Your Opensolr registration email address |
api_key | required | Your Opensolr API key |
cluster_name | required | The name for your new cluster |
master_server | required | The cluster environment region identifier (e.g. FRANKFURT_GERMANY). Use the Get Available Regions API to see available options. |
http_username | optional | HTTP Auth username for increased security on your cluster |
http_password | optional | HTTP Auth password for increased security on your cluster |
Prerequisite: You must have a cluster environment provisioned on your corporate account before you can add new clusters. Learn more about Resilient Clusters.
Code Examples
cURL
curl -s "https://opensolr.com/solr_manager/api/create_cluster?email=YOUR_EMAIL&api_key=YOUR_API_KEY&cluster_name=prod_cluster&master_server=FRANKFURT_GERMANY"
PHP
$params = http_build_query([ 'email' => 'YOUR_EMAIL', 'api_key' => 'YOUR_API_KEY', 'cluster_name' => 'prod_cluster', 'master_server' => 'FRANKFURT_GERMANY', 'http_username' => 'my_user', // optional 'http_password' => 'my_password', // optional ]); $response = json_decode(file_get_contents( 'https://opensolr.com/solr_manager/api/create_cluster?' . $params ), true); print_r($response);
Python
import requests response = requests.get( "https://opensolr.com/solr_manager/api/create_cluster", params={ "email": "YOUR_EMAIL", "api_key": "YOUR_API_KEY", "cluster_name": "prod_cluster", "master_server": "FRANKFURT_GERMANY", "http_username": "my_user", # optional "http_password": "my_password", # optional } ) data = response.json() print(data)
Related Documentation
Resilient Clusters
Learn about Opensolr Resilient Clusters with automatic failover and high availability.
Create Index
Create a new standalone Solr index via the API.
Available Regions
Get a list of all server regions where you can create indexes and clusters.
Need a custom cluster setup or dedicated infrastructure? Let us know.
Contact Support