API - Update HTTP Auth
Update HTTP Auth
Set or update HTTP Basic Authentication credentials for your Opensolr Index. Protects your Solr endpoints with username/password authentication.
Endpoint
GET https://opensolr.com/solr_manager/api/update_http_auth
Parameters
| Parameter | Status | Description |
|---|---|---|
email | Required | Your Opensolr registration email address |
api_key | Required | Your Opensolr API key |
core_name | Required | The name of the index you wish to add or update HTTP Auth protection for |
username | Required | The username for HTTP Basic Auth on this index |
password | Required | The password for HTTP Basic Auth on this index |
Code Examples
cURL
curl -s "https://opensolr.com/solr_manager/api/update_http_auth?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_solr_core&username=index_auth_username&password=index_auth_password"
PHP
$params = http_build_query([ 'email' => 'YOUR_EMAIL', 'api_key' => 'YOUR_API_KEY', 'core_name' => 'my_solr_core', 'username' => 'index_auth_username', 'password' => 'index_auth_password', ]); $response = file_get_contents("https://opensolr.com/solr_manager/api/update_http_auth?{$params}"); $result = json_decode($response, true); print_r($result);
Python
import requests response = requests.get("https://opensolr.com/solr_manager/api/update_http_auth", params={ "email": "YOUR_EMAIL", "api_key": "YOUR_API_KEY", "core_name": "my_solr_core", "username": "index_auth_username", "password": "index_auth_password", }) print(response.json())
Related Documentation
Need help securing your Opensolr Indexes? We are here to help.
Contact Support