Scoped API Key for Drupal Opensolr Search

One box, exactly the endpoints the module calls

A key that only does what the module does

The Drupal module Opensolr Search builds the search of your site on an Opensolr index: indexing, search page, AI answers, chat bot. It works with your master API key, but it does not need everything that key can do. Give it a scoped key made for it instead: one box ticks exactly the endpoints the module calls.

Create the key

  1. Open Account › API Keys.
  2. Name this key, for example Drupal site www.example.com.
  3. Under What may this key do?, tick Drupal: Opensolr Search.
  4. Under Which indexes may it touch?, keep All of my indexes, or tick only the index this site uses. If the module still has to create the index during setup, keep all, or add a name pattern that matches it.
  5. Click Create key and copy it.

You do not use the Opensolr Search AI submodule? Untick its endpoints before you create the key.

Put it in Drupal

  1. Go to Configuration › Search and metadata › Opensolr Search (/admin/config/search/opensolr).
  2. The Opensolr Email stays the email of your Opensolr account.
  3. Paste the scoped key as the API Key and save.

The key must be sent with the email of the account that created it, also when a colleague sets up the site.

What the box ticks: 39 endpoints

Opensolr Search

EndpointWhat the module uses it for
get_envLists the regions you can create the search index in, during setup.
get_index_listLists your indexes so you can connect an existing one.
create_indexCreates the search index during setup.
upload_zip_config_filesUploads the search configuration files to the index during setup.
reload_coreReloads the index after setup.
get_core_infoReads the address and HTTP password of the index.
get_settings_dashboardFills the settings page: account, crawler and index data in one call.
get_account_summaryShows your plan, usage and limits on the settings page.
add_crawl_url_signedGives the index the address of your site map, so your pages get indexed.
delete_crawler_urlQueues a page you changed, so it is indexed again with the new content.
start_crawlStarts indexing your site.
stop_crawlStops indexing.
pause_crawlPauses indexing.
move_done_to_todoQueues every page again, to refresh the whole index.
crawl_schedule_statusShows whether indexing runs on a schedule.
crawler_activeShows whether indexing is running right now.
get_crawl_statsShows how many pages are indexed, queued and failed.
reset_indexEmpties the index, to start over.
delete_indexDeletes the search index.
ingestSends your content to the index with Data Ingestion.
elevation_toggleTurns pinned and excluded results on or off.
embedTurns the search query into a vector for hybrid search.
embed_and_searchRuns a hybrid search in one call.
ai_summaryWrites the AI answer above the search results.
image_to_textSearches with a picture.

Opensolr Search AI (submodule)

EndpointWhat the module uses it for
vdb_infoChecks that the index is ready for Drupal AI vector search.
vdb_searchRuns a Drupal AI vector search on the index.
chat_completionsAnswers through the Opensolr AI provider in Drupal AI.
doc_to_textAI tool: reads a document.
image_alt_textAI tool: describes a picture.
enrich_textAI tool: analyzes a text.
ip_geoAI tool: finds where an address is.
address_geoAI tool: finds a place on the map.
geo_distanceAI tool: measures the distance between two places.
postal_codesAI tool: looks up postal codes.
local_timeAI tool: tells the local time of a place.
currency_ratesAI tool: converts currencies.
vat_checkAI tool: checks a VAT number.
vat_ratesAI tool: looks up VAT rates.

Good to know

  • The module reads the HTTP password of the index with get_core_info, to search it directly. So this key can read the passwords of the indexes it may touch.
  • A new version of the module may start calling a new endpoint. If it answers 403 ERROR_SCOPED_KEY_ENDPOINT_NOT_ALLOWED, edit the key and tick the box again.
  • You can change, revoke or regenerate the key at any time on Account › API Keys. See Authentication and keys.

More about the module

API Reference pages