Uploads one configuration file to your Opensolr Index, such as schema.xml or synonyms.txt. A file with the same name is replaced.
https://opensolr.com/solr_manager/api/upload_config_fileemail and api_key of your account, as GET or POST parameters: Authentication.01 · Parameters
core_nameRequiredThe name of your index.
userfileRequiredThe file. Its name on your disk is the name it gets on the index. Accepted: .xml, .txt, .zip, .aff, .dic.
02 · Example
curl -s -X POST "https://opensolr.com/solr_manager/api/upload_config_file" \ -F "email=YOUR_EMAIL" -F "api_key=YOUR_API_KEY" -F "core_name=my_index" \ -F "userfile=@schema.xml"
03 · Answer
status is true and msg holds the answer of the server, which reloads the index with the new file. When Solr cannot load the file, msg carries its error.
upload_zip_config_files.04 · Errors
ERROR_NOT_CORE_OWNERHTTP 200The index is not yours.
errorHTTP 200In msg, when the upload itself failed, for example a file type that is not accepted.
ERROR_AUTHENTICATION_FAILEDHTTP 403The email and API key do not match.
ERROR_RATE_LIMIT_PER_MINUTEHTTP 429Too many calls. Wait for the Retry-After seconds: Rate limits.
05 · Related
Read a file back: get_file. List the files: get_all_config_files. Delete one: delete_config_file.
What each file does: The configuration files.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.