API - Create Resilient Cluster
Creates an index on your Resilient Cluster: the master index, plus one replica index on each replica server of the cluster, kept in sync with the master.
https://opensolr.com/solr_manager/api/create_clusteremail and api_key of your account, as GET or POST parameters: Authentication. A scoped key limited to some indexes is refused: this call acts on the whole account.01 · Parameters
cluster_nameRequiredThe name of the new cluster index. Only letters and digits are kept: prod_search becomes prodsearch.
master_serverRequiredThe identifier of your cluster environment, as get_env lists it under cluster_owned_environments.
02 · Example
curl -s "https://opensolr.com/solr_manager/api/create_cluster?email=YOUR_EMAIL&api_key=YOUR_API_KEY&cluster_name=prodsearch&master_server=YOUR_CLUSTER_ENVIRONMENT"
03 · Answer
{ "status": true, "server_message": "OK", "core_hostname": "HOSTNAME_OF_YOUR_CLUSTER", "solr_version": "9.60" }
The replicas are named replica1_prodsearch, replica2_prodsearch and so on. Upload the configuration on the master: upload_zip_config_files passes it to every replica.
04 · Errors
server_message, not status: only OK means the cluster index was created. The plan limit answers with status still true.ERROR_INVALID_CORE_NAMENo cluster_name.
ERROR_INVALID_SERVER_COUNTRYmaster_server is not a cluster environment of yours.
ERROR_CLUSTER_NAME_ALREADY_EXISTSAn index with this name exists already.
ERROR_CANNOT_ADD_MORE_THAN_N_CLUSTERSYou have as many clusters as your plan allows. N is the number of your plan.
ERROR_SCOPED_KEY_ACCOUNT_LEVEL_NOT_ALLOWEDHTTP 403A scoped key limited to some indexes was used.
ERROR_AUTHENTICATION_FAILEDHTTP 403The email and API key do not match.
05 · Related
Remove a dedicated environment: delete_environment.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.