Config Files

Opensolr Config Files — find answers to your questions

API - Delete configuration file

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
Read Full Answer

API - Get configuration file

API Endpoint

Get Configuration File

Download a specific configuration file from your Opensolr index. Returns the raw file content. Specify the file name and extension separately.

Endpoint

GET https://opensolr.com/solr_manager/api/get_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 retrieve, without the file extension (e.g. schema)
file_extensionrequiredThe file extension, without the period (e.g. xml)

Code Examples

cURL

# Download schema.xml and save to a local file
curl -s "https://opensolr.com/solr_manager/api/get_file?email=YOUR_EMAIL&api_key=YOUR_API_KEY&index_name=YOUR_INDEX&file_name=schema&file_extension=xml" -o schema.xml

PHP

$params = http_build_query([
    'email'          => 'YOUR_EMAIL',
    'api_key'        => 'YOUR_API_KEY',
    'index_name'     => 'YOUR_INDEX',
    'file_name'      => 'schema',
    'file_extension' => 'xml',
]);
$content = file_get_contents(
    'https://opensolr.com/solr_manager/api/get_file?' . $params
);
// Save to local file
file_put_contents('schema.xml', $content);
echo "File saved to schema.xml\n";

Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/get_file",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "index_name": "YOUR_INDEX",
        "file_name": "schema",
        "file_extension": "xml",
    }
)
# Save to local file
with open("schema.xml", "w") as f:
    f.write(response.text)
print("File saved to schema.xml")

Related Documentation

List Config Files

Get a list of all configuration files on your index.

Upload Config File

Upload or update a single configuration file.

Delete Config File

Delete a configuration file from your index.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer

API - Get all the Solr configuration files list

API Endpoint

Get All Configuration Files List

Retrieve a list of all configuration files present on your Opensolr index. Use this to see which config files are available before downloading or modifying them.

Endpoint

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

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
core_namerequiredThe name of your Opensolr index

Code Examples

cURL

curl -s "https://opensolr.com/solr_manager/api/get_all_config_files?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=YOUR_INDEX"

PHP

$params = http_build_query([
    'email'     => 'YOUR_EMAIL',
    'api_key'   => 'YOUR_API_KEY',
    'core_name' => 'YOUR_INDEX',
]);
$response = json_decode(file_get_contents(
    'https://opensolr.com/solr_manager/api/get_all_config_files?' . $params
), true);
print_r($response);

Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/get_all_config_files",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "core_name": "YOUR_INDEX",
    }
)
data = response.json()
print(data)

Related Documentation

Get Config File

Download a specific configuration file from your index.

Upload Config File

Upload or update a single configuration file.

Upload Config Zip

Upload multiple config files at once as a zip archive.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer

API - Upload solr configuration via zip archive

API Endpoint

Upload Configuration via Zip Archive

Upload multiple Solr configuration files at once by sending a zip archive. Use this when you need to update several config files together (e.g. schema.xml, solrconfig.xml, and supporting files).

Endpoint

POST https://opensolr.com/solr_manager/api/upload_zip_config_files

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
core_namerequiredThe name of your Opensolr index
userfilerequiredYour config.zip file containing the configuration files to upload (sent as multipart form data)
Zip structure: Place your configuration files (e.g. schema.xml, solrconfig.xml, stopwords.txt) at the root of the zip archive — do not nest them in subdirectories.

Code Examples

cURL

curl -X POST https://opensolr.com/solr_manager/api/upload_zip_config_files \
  -F "email=YOUR_EMAIL" \
  -F "api_key=YOUR_API_KEY" \
  -F "core_name=YOUR_INDEX" \
  -F "userfile=@/path/to/config.zip"

PHP

$ch = curl_init('https://opensolr.com/solr_manager/api/upload_zip_config_files');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS     => [
        'email'     => 'YOUR_EMAIL',
        'api_key'   => 'YOUR_API_KEY',
        'core_name' => 'YOUR_INDEX',
        'userfile'  => new CURLFile('/path/to/config.zip'),
    ],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);

Python

import requests

with open("/path/to/config.zip", "rb") as f:
    response = requests.post(
        "https://opensolr.com/solr_manager/api/upload_zip_config_files",
        data={
            "email": "YOUR_EMAIL",
            "api_key": "YOUR_API_KEY",
            "core_name": "YOUR_INDEX",
        },
        files={
            "userfile": ("config.zip", f, "application/zip"),
        }
    )
data = response.json()
print(data)

Related Documentation

Upload Single File

Upload or update a single configuration file.

List Config Files

Get a list of all configuration files on your index.

Get Config File

Download a specific configuration file from your index.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer

API - Upload or update your opensolr configuration files

API Endpoint

Upload Configuration File

Upload or update a single Solr configuration file on your Opensolr index. Use this to automate the deployment of individual config files like schema.xml or solrconfig.xml.

Endpoint

POST https://opensolr.com/solr_manager/api/upload_config_file

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
core_namerequiredThe name of your Opensolr index
userfilerequiredThe configuration file to upload (sent as multipart form data). The file name on the server will match the uploaded file name.

Code Examples

cURL

curl -X POST https://opensolr.com/solr_manager/api/upload_config_file \
  -F "email=YOUR_EMAIL" \
  -F "api_key=YOUR_API_KEY" \
  -F "core_name=YOUR_INDEX" \
  -F "userfile=@/path/to/schema.xml"

PHP

$ch = curl_init('https://opensolr.com/solr_manager/api/upload_config_file');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS     => [
        'email'     => 'YOUR_EMAIL',
        'api_key'   => 'YOUR_API_KEY',
        'core_name' => 'YOUR_INDEX',
        'userfile'  => new CURLFile('/path/to/schema.xml'),
    ],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);

Python

import requests

with open("/path/to/schema.xml", "rb") as f:
    response = requests.post(
        "https://opensolr.com/solr_manager/api/upload_config_file",
        data={
            "email": "YOUR_EMAIL",
            "api_key": "YOUR_API_KEY",
            "core_name": "YOUR_INDEX",
        },
        files={
            "userfile": ("schema.xml", f, "application/xml"),
        }
    )
data = response.json()
print(data)
Tip: After uploading new configuration files, reload your index for the changes to take effect.

Related Documentation

Upload Config Zip

Upload multiple config files at once as a zip archive.

List Config Files

Get a list of all configuration files on your index.

Reload Index

Reload your index to apply configuration changes.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer