Cluster Management API
Delete a Dedicated Environment
Tears down a dedicated environment you provisioned (one of your cluster_owned_environments in get_env): every server in it and its load balancer are decommissioned by a background job. Shared Opensolr environments cannot be deleted.
Endpoint
GET https://opensolr.com/solr_manager/api/delete_environment
Parameters
| Parameter | Status | Description |
|---|---|---|
email | Required | Your Opensolr registration email address |
api_key | Required | Your Opensolr API key (master key, or a scoped key that allows this endpoint) |
env_name | Required | The environment tag name exactly as returned by get_env (cluster_owned_environments[].server_identifier) |
How It Works
Ownership of the environment is checked first; a mismatch answers Not Owner! and nothing is queued. Otherwise a delete_env job is created and processed by the Opensolr job runner, which removes the servers, the load balancer and their DNS records and stops billing for them. Indexes still living in that environment are destroyed with it — move or back them up first (create_backup, then replicate_index into another environment).
Irreversible. There is no undo once the job runs. The call itself only queues the job; use the control panel’s Environments page to watch its progress.
Response
| Key | Type | Description |
|---|---|---|
| on success | HTTP 200 with an empty body — the deletion job has been queued | |
| on error | Plain-text Not Owner! followed by Please fix the errors above! when the environment is not yours or the name is unknown |
Code Examples
cURL
curl -s "https://opensolr.com/solr_manager/api/delete_environment?email=YOUR_EMAIL&api_key=YOUR_API_KEY&env_name=MY-ENV-TAG"
PHP
$q = http_build_query(['email' => 'YOUR_EMAIL', 'api_key' => 'YOUR_API_KEY', 'env_name' => 'MY-ENV-TAG']); echo file_get_contents("https://opensolr.com/solr_manager/api/delete_environment?{$q}");
Python
import requests r = requests.get("https://opensolr.com/solr_manager/api/delete_environment", params={"email": "YOUR_EMAIL", "api_key": "YOUR_API_KEY", "env_name": "MY-ENV-TAG"}, timeout=30) print(r.text)
Example Response
(empty body — job queued) # or, when the environment is not yours: Not Owner! Please fix the errors above!
Use Cases
- Tear down a temporary load-test or staging environment from CI when the run ends
- Decommission a region you no longer serve
- Clean up after migrating indexes to a newer Solr environment
Related Documentation
Environments & ServersFind the environment tag name.Create Resilient ClusterProvision a new dedicated cluster.Replicate IndexMove an index to another environment first.Create BackupSnapshot before deleting.
Need help with the Opensolr API? We are here to help.
Contact Support