Skip to content

Reference

Algolia

Connect Algolia to Alter Vault for secure API access

Use Algolia credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDalgolia
CategorySearch
Credential TypeAPI Key

Log in to the Algolia Dashboard

Log in to the Algolia Dashboard at dashboard.algolia.com.

Go to Settings → API Keys

Go to Settings → API Keys at dashboard.algolia.com/account/api-keys/all.

Copy the Admin API Key

Copy the Admin API Key (or create a new one with specific permissions).

Copy the Application ID

Copy the Application ID for the Application ID field.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Algolia

Go to Managed Secrets > Add Provider > Algolia.

Enter credentials

Paste your Admin API Key into the credential field.

Enter the Application ID

Paste your Application ID (e.g. B1G2GM9NG0) into the Application ID field. Alter injects it as the X-Algolia-Application-ID header and derives this credential’s allowed hosts from it — the application’s write, DSN, and fallback search hosts (APPID.algolia.net, APPID-dsn.algolia.net, APPID-1.algolianet.com, APPID-2.algolianet.com, APPID-3.algolianet.com) — so proxied calls can only ever reach your application’s Search API. Algolia’s other APIs (such as Insights and Analytics) live on separate fixed hosts and are not covered by this template. The allowlist cannot be widened or edited separately; rotate the credential with a new Application ID to retarget it.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.POST,
"https://YOUR_APP_ID-dsn.algolia.net/1/indexes/YOUR_INDEX/query",
grant_id="YOUR_GRANT_ID",
json={"query": "search terms"},
)

For deleteBy, parameter conditions can target indexName. Current filter and geo-selector fields are accepted, but they are not projected as scalar policy parameters: filters contain case-sensitive expressions, and geo selectors can override each other. Selector conditions, including obsolete params conditions, fail closed. The obsolete params request field is rejected. Use operation, family, or index-level controls for this operation.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
searchreadPOST/1/indexes/*/queries
searchSingleIndexreadPOST/1/indexes/{indexName}/query
searchForFacetValuesreadPOST/1/indexes/{indexName}/facets/{facetName}/query
browsereadPOST/1/indexes/{indexName}/browse
getObjectreadGET/1/indexes/{indexName}/{objectID}
getObjectsreadPOST/1/indexes/*/objects
saveObjectwritePOST/1/indexes/{indexName}
addOrUpdateObjectwritePUT/1/indexes/{indexName}/{objectID}
partialUpdateObjectwritePOST/1/indexes/{indexName}/{objectID}/partial
batchdelete, writePOST/1/indexes/{indexName}/batch
multipleBatchdelete, writePOST/1/indexes/*/batch
deleteObjectdeleteDELETE/1/indexes/{indexName}/{objectID}
deleteBydeletePOST/1/indexes/{indexName}/deleteByQuery
clearObjectsdeletePOST/1/indexes/{indexName}/clear
deleteIndexdeleteDELETE/1/indexes/{indexName}
operationIndexdelete, writePOST/1/indexes/{indexName}/operation
listIndicesreadGET/1/indexes
getSettingsreadGET/1/indexes/{indexName}/settings
setSettingsadminPUT/1/indexes/{indexName}/settings
saveRulewritePUT/1/indexes/{indexName}/rules/{objectID}
searchRulesreadPOST/1/indexes/{indexName}/rules/search
saveSynonymwritePUT/1/indexes/{indexName}/synonyms/{objectID}
searchSynonymsreadPOST/1/indexes/{indexName}/synonyms/search
getTaskreadGET/1/indexes/{indexName}/task/{taskID}
getLogsreadGET/1/logs
addApiKeyadminPOST/1/keys
listApiKeysreadGET/1/keys

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.