Integrations
Algolia
Connect Algolia to Alter Vault for secure API access
Overview
Section titled “Overview”Use Algolia credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Template ID | algolia |
| Category | Search |
| Credential Type | API Key |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”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.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”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 the Admin API Key into the credential field.
Enter the Application ID
Paste the 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 the 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.
Using in Code
Section titled “Using in Code”from alter_sdk import PendingApprovalresponse = await alter_app.proxy_request( HttpMethod.POST, "https://YOUR_APP_ID-dsn.algolia.net/1/indexes/YOUR_INDEX/query", grant_id="YOUR_GRANT_ID", json={"query": "search terms"},)if isinstance(response, PendingApproval): for gate in response.gates: print("Approval required:", gate.approval_url) response = await alter_app.await_approval(response.approval_id)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.
Policy-cataloged operations
Section titled “Policy-cataloged operations”Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.
| Operation ID | Families | Method | Provider path | Notes |
|---|---|---|---|---|
search | read | POST | /1/indexes/*/queries | — |
searchSingleIndex | read | POST | /1/indexes/{indexName}/query | — |
searchForFacetValues | read | POST | /1/indexes/{indexName}/facets/{facetName}/query | — |
browse | read | POST | /1/indexes/{indexName}/browse | — |
getObject | read | GET | /1/indexes/{indexName}/{objectID} | — |
getObjects | read | POST | /1/indexes/*/objects | — |
saveObject | write | POST | /1/indexes/{indexName} | — |
addOrUpdateObject | write | PUT | /1/indexes/{indexName}/{objectID} | — |
partialUpdateObject | write | POST | /1/indexes/{indexName}/{objectID}/partial | — |
batch | delete, write | POST | /1/indexes/{indexName}/batch | — |
multipleBatch | delete, write | POST | /1/indexes/*/batch | — |
deleteObject | delete | DELETE | /1/indexes/{indexName}/{objectID} | — |
deleteBy | delete | POST | /1/indexes/{indexName}/deleteByQuery | — |
clearObjects | delete | POST | /1/indexes/{indexName}/clear | — |
deleteIndex | delete | DELETE | /1/indexes/{indexName} | — |
operationIndex | delete, write | POST | /1/indexes/{indexName}/operation | — |
listIndices | read | GET | /1/indexes | — |
getSettings | read | GET | /1/indexes/{indexName}/settings | — |
setSettings | admin | PUT | /1/indexes/{indexName}/settings | — |
saveRule | write | PUT | /1/indexes/{indexName}/rules/{objectID} | — |
searchRules | read | POST | /1/indexes/{indexName}/rules/search | — |
saveSynonym | write | PUT | /1/indexes/{indexName}/synonyms/{objectID} | — |
searchSynonyms | read | POST | /1/indexes/{indexName}/synonyms/search | — |
getTask | read | GET | /1/indexes/{indexName}/task/{taskID} | — |
getLogs | read | GET | /1/logs | — |
addApiKey | admin | POST | /1/keys | refused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it) |
listApiKeys | read | GET | /1/keys | refused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it) |
restoreApiKey | admin | POST | /1/keys/{key}/restore | refused by default: hands the caller a provider credential, or revokes the connection’s own (a credential_minting rule can allow it) |
Unreviewed operations
Section titled “Unreviewed operations”These operations are in the provider’s published API specification, but Alter has not reviewed them yet, so their families are unknown. Every operation, family or content rule refuses one with operation_unreviewed unless a rule admits it by name, so a broad rule cannot be dodged by calling one. A rule names one by the provider-qualified name in the first column, never by the bare operation ID, which other providers may share. To use one under a rule, list that name in an operation allowlist to allow it, or in a require_approval rule whose every condition names it to hold it for approval; saving such a rule needs an organization admin. A family never admits one. Because an unreviewed operation may create credentials or change account security, admitting one also needs a scoped credential_minting allowance naming the provider and that name. See Unreviewed operations.
| Name in a rule | Method | Provider path |
|---|---|---|
algolia:accountCopyIndex | GET | /accountCopyIndex |
algolia:appendSource | POST | /1/security/sources/append |
algolia:assignUserId | POST | /1/clusters/mapping |
algolia:batchAssignUserIds | POST | /1/clusters/mapping/batch |
algolia:batchDictionaryEntries | POST | /1/dictionaries/{dictionaryName}/batch |
algolia:browseObjects | GET | /browseObjects |
algolia:chunkedBatch | GET | /chunkedBatch |
algolia:clearRules | POST | /1/indexes/{indexName}/rules/clear |
algolia:clearSynonyms | POST | /1/indexes/{indexName}/synonyms/clear |
algolia:customDelete | DELETE | /{path} |
algolia:customGet | GET | /{path} |
algolia:customPost | POST | /{path} |
algolia:customPut | PUT | /{path} |
algolia:deleteApiKey | DELETE | /1/keys/{key} |
algolia:deleteObjects | POST | /deleteObjects |
algolia:deleteRule | DELETE | /1/indexes/{indexName}/rules/{objectID} |
algolia:deleteSource | DELETE | /1/security/sources/{source} |
algolia:deleteSynonym | DELETE | /1/indexes/{indexName}/synonyms/{objectID} |
algolia:generateSecuredApiKey | GET | /generateSecuredApiKey |
algolia:getApiKey | GET | /1/keys/{key} |
algolia:getAppTask | GET | /1/task/{taskID} |
algolia:getDictionaryLanguages | GET | /1/dictionaries/*/languages |
algolia:getDictionarySettings | GET | /1/dictionaries/*/settings |
algolia:getRule | GET | /1/indexes/{indexName}/rules/{objectID} |
algolia:getSources | GET | /1/security/sources |
algolia:getSynonym | GET | /1/indexes/{indexName}/synonyms/{objectID} |
algolia:getTopUserIds | GET | /1/clusters/mapping/top |
algolia:getUserId | GET | /1/clusters/mapping/{userID} |
algolia:hasPendingMappings | GET | /1/clusters/mapping/pending |
algolia:indexExists | GET | /indexExists |
algolia:listClusters | GET | /1/clusters |
algolia:listUserIds | GET | /1/clusters/mapping |
algolia:partialUpdateObjects | POST | /partialUpdateObjects |
algolia:partialUpdateObjectsWithTransformation | POST | /partialUpdateObjectsWithTransformation |
algolia:removeUserId | DELETE | /1/clusters/mapping/{userID} |
algolia:replaceAllObjects | GET | /replaceAllObjects |
algolia:replaceAllObjectsWithTransformation | GET | /replaceAllObjectsWithTransformation |
algolia:replaceSources | PUT | /1/security/sources |
algolia:saveObjects | GET | /saveObjects |
algolia:saveObjectsWithTransformation | GET | /saveObjectsWithTransformation |
algolia:saveRules | POST | /1/indexes/{indexName}/rules/batch |
algolia:saveSynonyms | POST | /1/indexes/{indexName}/synonyms/batch |
algolia:searchDictionaryEntries | POST | /1/dictionaries/{dictionaryName}/search |
algolia:searchUserIds | POST | /1/clusters/mapping/search |
algolia:setClientApiKey | GET | /setClientApiKey |
algolia:setDictionarySettings | PUT | /1/dictionaries/*/settings |
algolia:updateApiKey | PUT | /1/keys/{key} |
algolia:waitForApiKey | GET | /waitForApiKey |
algolia:waitForAppTask | GET | /waitForAppTask |
algolia:waitForTask | GET | /waitForTask |