A key that only does what the plugin does
The WordPress plugin Opensolr Search builds the search of your site on an Opensolr index: indexing, search page, AI answers. 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 plugin calls.
Create the key
- Open Account › API Keys.
- Name this key, for example WordPress site www.example.com.
- Under What may this key do?, tick WordPress: Opensolr Search.
- Under Which indexes may it touch?, keep All of my indexes, or tick only the index this site uses. If the plugin still has to create the index during setup, keep all, or add a name pattern that matches it.
- Click Create key and copy it.
Put it in WordPress
- Go to Settings › Opensolr Search.
- Under Opensolr Credentials, the Email stays the email of your Opensolr account.
- 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: 22 endpoints
Opensolr Search for WordPress
| Endpoint | What the module uses it for |
|---|---|
vector_regions | Picks the region closest to you for a new index, during setup. |
get_index_list | Lists your indexes so you can connect an existing one. |
create_index | Creates the search index during setup. |
upload_zip_config_files | Uploads the search configuration files to the index during setup. |
reload_core | Reloads the index after setup. |
get_core_info | Reads the address and HTTP password of the index. |
get_settings_dashboard | Fills the settings page: account, crawler and index data in one call. |
get_account_summary | Shows your plan, usage and limits on the settings page. |
add_crawl_url_signed | Gives the index the address of your site map, so your posts and pages get indexed. |
start_crawl | Starts indexing your site. |
stop_crawl | Stops indexing. |
move_done_to_todo | Queues every page again, to refresh the whole index. |
crawl_schedule_status | Shows whether indexing runs on a schedule. |
get_crawl_stats | Shows how many pages are indexed, queued and failed. |
reset_index | Empties the index, to start over. |
delete_index | Deletes the search index. |
ingest | Sends your content to the index with Data Ingestion. |
elevation_toggle | Turns pinned and excluded results on or off. |
embed | Turns the search query into a vector for hybrid search. |
embed_and_search | Runs a hybrid search in one call. |
ai_summary | Writes the AI answer above the search results. |
image_to_text | Searches with a picture. |
Good to know
- The plugin 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 plugin 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.