API - Delete configuration file

Config Files
API Endpoint

Delete Configuration File

Delete a specific configuration file from your Opensolr index. Specify the file name and extension separately.

Endpoint

GET https://opensolr.com/solr_manager/api/delete_config_file

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
index_namerequiredThe name of your Opensolr index
file_namerequiredThe name of the config file to delete, without the file extension (e.g. schema)
file_extensionrequiredThe file extension, without the period (e.g. xml)
Caution: Deleting essential config files like schema.xml or solrconfig.xml will prevent your index from loading. Make sure you have a backup or replacement ready before deleting critical files.

Code Examples

cURL

curl -s "https://opensolr.com/solr_manager/api/delete_config_file?email=YOUR_EMAIL&api_key=YOUR_API_KEY&index_name=YOUR_INDEX&file_name=schema&file_extension=xml"

PHP

$params = http_build_query([
    'email'          => 'YOUR_EMAIL',
    'api_key'        => 'YOUR_API_KEY',
    'index_name'     => 'YOUR_INDEX',
    'file_name'      => 'schema',
    'file_extension' => 'xml',
]);
$response = json_decode(file_get_contents(
    'https://opensolr.com/solr_manager/api/delete_config_file?' . $params
), true);
print_r($response);

Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/delete_config_file",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "index_name": "YOUR_INDEX",
        "file_name": "schema",
        "file_extension": "xml",
    }
)
data = response.json()
print(data)

Related Documentation

Get Config File

Download a specific configuration file from your index.

List Config Files

Get a list of all configuration files on your index.

Upload Config File

Upload or update a single configuration file.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support