Skip to content

Reference

DataStax Astra DB (Data API)

Connect the DataStax Astra DB Data API to Alter Vault for secure API access

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

PropertyValue
Provider IDastra
CategoryDatabase
Credential TypeApplication Token
API hosthttps://<db-id>-<region>.apps.astra.datastax.com (per database)

Log in to the Astra Portal

Log in to the Astra Portal.

Generate a token

Open the database’s Overview tab and click Generate Token.

Copy the token

Copy the application token (starts with AstraCS:) — it is only shown once.

Open the Developer Portal

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

Add DataStax Astra DB

Go to Managed Secrets > Add Provider > DataStax Astra DB.

Enter credentials

Paste your Application Token into the credential field.

Save

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

response = await alter_app.request(
HttpMethod.POST,
"https://YOUR-DB-ID-REGION.apps.astra.datastax.com/api/json/v1/default_keyspace/my_collection",
grant_id="YOUR_GRANT_ID",
json={"find": {"filter": {}, "options": {"limit": 5}}},
)
  • The token is injected via the Token header at the database’s Data API endpoint.
  • Creating or listing databases uses a different provider and a different header — see DataStax Astra DevOps.

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

Operation IDFamiliesMethodProvider path
collection/deleteManyadmin, delete, read, writePOST/api/json/v1/{keyspace}/{collection}
keyspace/dropCollectionadmin, delete, read, writePOST/api/json/v1/{keyspace}
database/findEmbeddingProvidersadmin, delete, read, writePOST/api/json/v1

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.