Opensolr REST API

Written by: Open Solr Administrator

	MY API KEY: Please log in
	MY API EMAIL: 
  1. Create a new SOLR index

    1. GET https://www.opensolr.com/solr_manager/api/create_core
    2. Parameters:
      1. email​ - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you want to create
      4. core_type - the type of the core to be created
        1. At the moment, core_type may be one of the following:
          1. drupal6
          2. magento
          3. drupal7
          4. wordpress
          5. ezpublish
          6. typo3
          7. joomla
          8. web
          9. generic
      5. server_country - the country, or geographical region in which you want your new solr core to be created
        1. At the moment, server_country may be one of the following (including your own private servers):
          • D-us-va-8
          • D-saopaulo61
          • D-sixuk
          • D-useast612
          • Romania-6
          • D-australia6
          • D-Deutsch-Seven
          • STOCKY
          • D-us-west-solr7
          • D-solr5de
          • SEVEN-UK
          • FRANKFURT_GERMANY
          • AWS_EC2_SOLR_6_1
          • D-docean51
          • AWS_EC2_CA_LA_USA_SOLR_5_1
          • GERMANY_SOLR_4_10
          • AWS_EC2_VIRGINIA_SOLR_4_10
          • AWS_EC2_VA_USA_1
          • UK
          • STUTTGART_GERMANY
          • AWS_EC2_CA_USA_SOLR_4_0
          • NETHERLANDS
    3. Example: https://www.opensolr.com/solr_manager/api/create_core?email=&
      api_key=Please log in&core_name=my_solr_core&server_country=USA_LOS_ANGELES&core_type=wordpress
  2. Delete a SOLR index

    1. GET https://www.opensolr.com/solr_manager/api/delete_core
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to delete
    3. Example: https://www.opensolr.com/solr_manager/api/delete_core?email=&
      api_key=Please log in&core_name=my_solr_core
  3. ​Replicate a SOLR index

    1. GET https://www.opensolr.com/solr_manager/api/replicate_index
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the master index. this index has to be created first.
      4. target_index - the name of the target replica indes. this index has to be created first.
    3. Example: https://www.opensolr.com/solr_manager/api/replicate_index?email=&
      api_key=Please log in&core_name=master_index&target_index=replica_index
  4. ​Create Index Backup

    1. GET https://www.opensolr.com/solr_manager/api/create_backup
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to create a backup for
    3. Example: https://www.opensolr.com/solr_manager/api/create_backup?email=&
      api_key=Please log in&core_name=my_solr_core
  5. ​​Get List of All Backup Files

    1. GET https://www.opensolr.com/solr_manager/api/get_backup_files_list
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to get the backup files list for
    3. Example: https://www.opensolr.com/solr_manager/api/get_backup_files_list?email=&
      api_key=Please log in&core_name=my_solr_core
  6. Get index info and statistics

    1. GET https://www.opensolr.com/solr_manager/api/get_core_info

    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to get the backup files list for
    3. Example: https://www.opensolr.com/solr_manager/api/get_core_info?email=&
      api_key=Please log in&core_name=my_solr_core
  7. ​Download Index Backup File

    1. GET https://www.opensolr.com/solr_manager/api/download_backup_file
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to download a backup file for
      4. file_name - the name of the backup file, as generated by the get_backup_files_list API method.
    3. Example: https://www.opensolr.com/solr_manager/api/download_backup_file?email=&
      api_key=Please log in&core_name=my_solr_core&file_name=my_backup_file_name
  8. ​Trigger Start the Web Crawler

    1. GET https://www.opensolr.com/solr_manager/api/start_crawl
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to start the web crawler process for
    3. Example: https://www.opensolr.com/solr_manager/api/start_crawl?email=&
      api_key=Please log in&core_name=my_solr_core
  9. ​​Trigger Stop the Web Crawler

    1. GET https://www.opensolr.com/solr_manager/api/stop_crawl
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to stop the web crawler process for
    3. Example: https://www.opensolr.com/solr_manager/api/stop_crawl?email=&
      api_key=Please log in&core_name=my_solr_core
  10. ​​​Update HTTP Auth for your opensolr Index

    1. GET https://www.opensolr.com/solr_manager/api/update_http_auth
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to add or update HTTP Auth. protection for
      4. username - the username you want to use for the core you wish to protect using HTTP Auth.
      5. password - the password you want to use for the core you wish to protect using HTTP Auth.
    3. Example: https://www.opensolr.com/solr_manager/api/update_http_auth?email=&
      api_key=Please log in&core_name=my_solr_core&username=index_auth_username&password=index_auth_password
  11. ​Remove HTTP Auth

    1. GET https://www.opensolr.com/solr_manager/api/remove_http_auth
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to stop the web crawler process for
    3. Example: https://www.opensolr.com/solr_manager/api/remove_http_auth?email=&
      api_key=Please log in&core_name=my_solr_core
  12. Commit data for a SOLR core

    1. GET https://www.opensolr.com/solr_manager/api/commit
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to commit
    3. Example: https://www.opensolr.com/solr_manager/api/commit?email=&
      api_key=Please log in&core_name=my_solr_core
  13. Ping an opensolr server

    1. GET https://www.opensolr.com/solr_manager/api/ping
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​hostname - the hostname of the server you wish to ping
    3. Example: https://www.opensolr.com/solr_manager/api/ping_server?email=&
      api_key=Please log in&hostname=us.opensolr.com
  14. Optimize a SOLR core

    1. GET https://www.opensolr.com/solr_manager/api/optimize
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to optimize
    3. Example: https://www.opensolr.com/solr_manager/api/optimize?email=&
      api_key=Please log in&core_name=my_solr_core
  15. Get ful status of a SOLR core

    1. GET https://www.opensolr.com/solr_manager/api/get_core_status
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to get status for
    3. Example: https://www.opensolr.com/solr_manager/api/get_core_status?email=&
      api_key=Please log in&core_name=my_solr_core
  16. Add IP access rule for a SOLR core

    1. GET https://www.opensolr.com/solr_manager/api/add_ip
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to add an IP rule to
      4. ip - the IP address you wish to grant access
      5. handler - the SOLR URI handler that the restriction will be applied to
    3. Example: https://www.opensolr.com/solr_manager/api/add_ip?email=&
      api_key=Please log in&core_name=my_solr_core&ip=15.24.53.123&handler=/update
  17. Get IP list for a SOLR core

    1. GET https://www.opensolr.com/solr_manager/api/get_ip_list
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to get the list of IPs for
    3. Example: https://www.opensolr.com/solr_manager/api/get_ip_list?email=&
      api_key=Please log in&core_name=opensolr
  18. Remove IP access rule for a SOLR core

    1. GET https://www.opensolr.com/solr_manager/api/delete_ip
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to remove an IP rule from
      4. ip - the IP address you wish to remove from your core_name
      5. handler - the SOLR URI handler that the restriction has been applied to
    3. Example: https://www.opensolr.com/solr_manager/api/delete_ip?email=&
      api_key=Please log in&core_name=my_solr_core&ip=15.24.53.123&handler=/update
  19. ​Upload or Update your custom configuration files for a SOLR core

    1. ​POST https://www.opensolr.com/solr_manager/api/upload_config_file
    2. Parameters:
      1. ​email your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to upload the schema.xml for
      4. userfile - your local schema.xml file to POST and upload to the server
    3. Example here: https://www.opensolr.com/solr_manager/upload_config_files_form
  20. Delete core configuration file from the server

    1. GET https://www.opensolr.com/solr_manager/api/delete_config_file
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core
      4. file_name - the name of the config file you wish to remove from your solr core, without the file extension
      5. file_extension - the extension of the config file you wish to remove from your solr core, without the period.
    3. Example: https://www.opensolr.com/solr_manager/api/delete_config_file?email=&
      api_key=Please log in&core_name=my_solr_core&file_name=schema&file_extension=xml
  21. Reload a core - also used for troubleshooting

    1. GET https://www.opensolr.com/solr_manager/api/reload_core
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to remove
    3. Example: https://www.opensolr.com/solr_manager/api/reload_core?email=&
      api_key=Please log in&core_name=my_solr_core
  22. Get the server error log

    1. GET https://www.opensolr.com/solr_manager/api/get_error_log
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to get the error log for
    3. Example: https://www.opensolr.com/solr_manager/api/get_error_log?email=&
      api_key=Please log in&core_name=my_solr_core
  23. Get all the configuration files list from the server

    1. ​GET https://www.opensolr.com/solr_manager/api/get_all_config_files
    2. Parameters:
      1. ​email your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to upload the schema.xml for
    3. Example: https://www.opensolr.com/solr_manager/api/get_all_config_files?email=&
      api_key=Please log in&core_name=my_solr_core
  24. Upload zip archive containing your solr configuration files

    1. ​POST https://www.opensolr.com/solr_manager/api/upload_zip_config_files
    2. Parameters:
      1. ​email your opensolr registration email address
      2. api_key - your opensolr api_key
      3. core_name - the name of the core you wish to upload the schema.xml for
      4. userfile - your local config.zip file to POST and upload to the server
    3. Example: https://opensolr.com/solr_manager/upload_config_files_form
  25. Get Index Request Log

    You can use this method, to get your request log, in a SOLR JSON format.
    You can add almost every solr-supported parameter to your GET request, as GET parameters, as explained in the example below, where we get the first 10 request log entries for my_solr_core between dates: Sept. 09 2016 to Sept. 28 2016, sorted by date descending.

    1. GET https://www.opensolr.com/solr_manager/api/request_log
    2. Parameters:
      1. ​email - your opensolr registration email address
      2. api_key - your opensolr api_key
      3. ​core_name - the name of the core you wish to download a backup file for
      4. any other solr-supported query parameter, such as: q, start, rows, sort, etc
      5. Click here to learn more about the supported Solr Query Parameters
    3. Example: https://www.opensolr.com/solr_manager/api/request_log?email=&
      api_key=Please log in&core_name=my_solr_core&start=0&sort=date desc&rows=10&date:[2016-09-20T00:00:00Z TO 2016-09-28T00:00:00Z]

 

Please contact support if you feel we should add more methods or you have custom needs for your account