Management API of Solr Indexes
Authentication List of Solr Indexes Create a Solr Index Delete a Solr Index
Authentication
The authentication requires two parameters: api_token and secret_token. You can access these on the page API. You have to set those two parameters for every API call in order to authenticate successfully.
You can see a valid API call using the api_token 123 and secret_token 456 below:
curl 'https://app.hosted-solr.com/api/solr_cores.json?api_token=123&secret_token=456'
The HTTP status code 403 will be returned if the authentication is not successful.
List Solr Indexes
You can use the following API call to list all available Solr indexes:
curl 'https://app.hosted-solr.com/api/solr_cores.json?api_token=123&secret_token=456'
This would be a successful API answer:
[{
"id": 1,
"name": "test",
created_at": "2013-08-08T12:04:34Z",
"updated_at": "2013-08-08T12:04:34Z",
"user_id": 1,
"solr_version": "3.5",
"internal_name": "18221ac1e6b-test",
"password": "cb50cf62d14",
"is_activated": true,
"system": "typo3"
}]
The HTTP status code 200 will be returned.
Create New Solr Index
When creating a new Solr index you have to set some attributes. The following table lists the available attributes:
name required | Specifies the name of the core. |
variant required | Specifies the variant name. |
system required | Specifies the system of the core. |
solr_version required | Specifies the solr version of the core. |
schema required | Specifies the schema of the core when using TYPO3 (english, german, ..). |
Available Configurations:
TYPO3 CMS | |
8.5 (TYPO3 10.4LTS + EXT:Solr 11.0.x) | |
variant: | ext-11.0 |
system: | typo3 |
solr_version: | 8.5.1 |
schema: | arabic, armenian, basque, bulgarian, burmese, catalan, chinese, czech, danish, dutch, english, finnish, french, galician, german, greek, hindi, hungarian, indonesian, italian, japanese, khmer, korean, lao, norwegian, persian, polish, portuguese, romanian, russian, spanish, swedish, thai, turkish, ukrainian |
8.2 (TYPO3 9.5LTS + EXT:solr 10.0.x) | |
variant: | ext-10.0 |
system: | typo3 |
solr_version: | 8.2.0 |
schema: | arabic, armenian, basque, bulgarian, burmese, catalan, chinese, czech, danish, dutch, english, finnish, french, galician, german, greek, hindi, hungarian, indonesian, italian, japanese, khmer, korean, lao, norwegian, persian, polish, portuguese, romanian, russian, spanish, swedish, thai, turkish, ukrainian |
7.6 (TYPO3 8.7LTS + EXT:solr 9.0.x) | |
variant: | ext-9.0 |
system: | typo3 |
solr_version: | 7.6.0 |
schema: | arabic, armenian, basque, bulgarian, burmese, catalan, chinese, czech, danish, dutch, english, finnish, french, galician, german, greek, hindi, hungarian, indonesian, italian, japanese, khmer, korean, lao, norwegian, persian, polish, portuguese, romanian, russian, spanish, swedish, thai, turkish, ukrainian |
Drupal |
Magento Integernet |
Magento SolrBridge |
Magento |
Sunspot |
Wordpress |
curl -gX POST 'https://app.hosted-solr.com/api/solr_cores.json?solr_core[name]=foo&solr_core[variant]=ext-6.0&solr_core[solr_version]=6.3.0&solr_core[system]=typo3&solr_core[schema]=german&api_token=123&secret_token=456'
If the Solr index was created successfully the HTTP status code 201 will be returned. Otherwise the HTTP status code 422 will be returned.
Delete Solr Index
You can delete a Solr Index using the HTTP method DELETE. For example, if you want to delete the Solr index having the id 1 you can use the following API call:
curl -X DELETE 'https://app.hosted-solr.com/api/solr_cores/1.json?api_token=123&secret_token=456'
If the Solr index was deleted successfully the HTTP status code 204 will be returned. Otherweise the HTTP status code 404 will be returned.