Reference
Typesense
Connect Typesense to Alter Vault for secure API access
Overview
Section titled “Overview”Use Typesense credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | typesense |
| Category | Search |
| Credential Type | API Key |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to Typesense Cloud
Log in to Typesense Cloud and open the cluster.
Generate a key
Open API Keys and generate a key — use a scoped search-only key when the integration only reads.
Copy the key
Copy the key — it is only shown once.
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 Typesense
Go to Managed Secrets > Add Provider > Typesense.
Enter credentials
Paste your API Key into the credential field.
Enter the deployment endpoint
Paste your Cluster hostname — copy it from the Typesense Cloud dashboard (or use your self-hosted node’s host). Alter derives this credential’s allowed hosts from that exact host, so proxied calls can only ever reach your deployment. The allowlist cannot be widened or edited separately; rotate the credential with a new endpoint 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”response = await alter_app.request( HttpMethod.GET, "https://YOUR-CLUSTER.a1.typesense.net/collections/products/documents/search", grant_id="YOUR_GRANT_ID", query_params={"q": "running shoes", "query_by": "name,description"},)- The key is injected via the
X-TYPESENSE-API-KEYheader.
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 |
|---|---|---|---|
createCollection | write | POST | /collections |
getCollections | read | GET | /collections |
getCollection | read | GET | /collections/{collectionName} |
updateCollection | write | PATCH | /collections/{collectionName} |
deleteCollection | delete | DELETE | /collections/{collectionName} |
indexDocument | write | POST | /collections/{collectionName}/documents |
getDocument | read | GET | /collections/{collectionName}/documents/{documentId} |
updateDocument | write | PATCH | /collections/{collectionName}/documents/{documentId} |
deleteDocument | delete | DELETE | /collections/{collectionName}/documents/{documentId} |
updateDocuments | write | PATCH | /collections/{collectionName}/documents |
deleteDocuments | delete | DELETE | /collections/{collectionName}/documents |
importDocuments | write | POST | /collections/{collectionName}/documents/import |
exportDocuments | read | GET | /collections/{collectionName}/documents/export |
searchCollection | read | GET | /collections/{collectionName}/documents/search |
multiSearch | read | POST | /multi_search |
createKey | admin | POST | /keys |
getKeys | read | GET | /keys |
getKey | read | GET | /keys/{keyId} |
deleteKey | admin, delete | DELETE | /keys/{keyId} |
upsertAlias | write | PUT | /aliases/{aliasName} |
getAliases | read | GET | /aliases |
getAlias | read | GET | /aliases/{aliasName} |
deleteAlias | delete | DELETE | /aliases/{aliasName} |
health | read | GET | /health |