API documentation

This page contains the documentation of our API. You can use the API for managing your Solr indexes.

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://www.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://www.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
4.8 (TYPO3 6.2LTS + EXT:solr 3.0)
variant: ext-3.0
system: typo3
solr_version: 4.8
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
4.10 (TYPO3 7.6LTS + EXT:solr 5.1.x)
variant: ext-5.1
system: typo3
solr_version: 4.10
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
6.6 (TYPO3 7.6LTS & 8.7LTS + EXT:solr 6.5.x)
variant: ext-6.5
system: typo3
solr_version: 6.6.3
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
6.6 (TYPO3 8.7LTS + EXT:solr 7.5.x)
variant: ext-7.5
system: typo3
solr_version: 6.6.3
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
6.6 (TYPO3 8.7LTS + EXT:solr 8.0.x)
variant: ext-8.0
system: typo3
solr_version: 6.6.3
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
6.6 (TYPO3 8.7LTS + EXT:solr 8.1.x)
variant: ext-8.1
system: typo3
solr_version: 6.6.3
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
variant: drupal-4.8
system: drupal
solr_version: 4.8
schema: standard
Magento Integernet
variant: integernet-4.10
system: integernet
solr_version: 4.10
schema: english
Magento SolrBridge
variant: solrbridge-4.10
system: solrbridge
solr_version: 4.10
schema: german
Magento
variant: magento-4.10
system: magento
solr_version: 4.10
schema: english
Sunspot
variant: sunspot-4.10
system: sunspot
solr_version: 4.10
schema: standard
Wordpress
variant: wordpress-4.10
system: wordpress
solr_version: 4.10
schema: english

curl -gX POST https://www.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://www.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.

Feedback