AnomalyArmor supports two authentication methods:Documentation Index
Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
Use this file to discover all available pages before exploring further.
| Method | Use Case |
|---|---|
| API Keys | SDK, CLI, CI/CD pipelines, programmatic access |
| OAuth 2.1 | MCP server connections from AI tools (Claude Code, Cursor) |
API Key Format
API keys use the formataa_live_<random>:
Creating API Keys
Via Dashboard
- Go to Settings > API Keys
- Click Create API Key
- Enter a descriptive name (e.g., “Airflow Production”)
- Select scope based on needs:
read-onlyfor monitoring,read-writefor triggering actions,adminfor key management - Click Create Key
- Copy the key immediately
Via CLI
Via API
Scopes
| Scope | Capabilities |
|---|---|
read-only | GET endpoints only. Read assets, freshness, lineage, alerts. |
read-write | GET + POST. Trigger freshness/schema refreshes. |
admin | Full access including API key management. |
Scope Examples
read-only: Airflow pre-flight check
read-only: Airflow pre-flight check
Check if data is fresh before running pipelines. No ability to modify anything.
read-write: Trigger refresh after dbt run
read-write: Trigger refresh after dbt run
Check freshness and trigger a refresh when needed.
admin: Key rotation automation
admin: Key rotation automation
Create and revoke keys programmatically for security compliance.
Using API Keys
Environment Variable (Recommended)
Direct Parameter
HTTP Header
For direct API calls:Rate Limits by Tier
Rate limits are set when you create the API key based on your subscription:| Tier | Max Keys | Rate Limit | Burst |
|---|---|---|---|
| Free Trial | 1 | 20/min | 2/sec |
| Starter | 1 | 30/min | 3/sec |
| Growth | 10 | 500/min | 25/sec |
| Professional | 25 | 1,000/min | 50/sec |
| Enterprise | Unlimited | 5,000/min | 100/sec |
When you upgrade your plan, existing API keys automatically get the new rate limits.
Revoking Keys
Revoke compromised or unused keys immediately:Via Dashboard
- Go to Settings > API Keys
- Find the key and click the trash icon
- Confirm revocation
Via CLI
Via API
Security Best Practices
Use Environment Variables
Never hardcode API keys in source code. Use environment variables or secrets managers.
Rotate Regularly
Rotate keys periodically, especially for production systems.
Least Privilege
Use the minimum scope required. Most integrations only need
read-only.Separate Keys
Use different keys for different environments (dev, staging, prod).
Troubleshooting
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
- The key is valid but lacks permission for this operation
- Check the scope - you may need
read-writeoradmin
429 Rate Limited
429 Rate Limited
- You’ve exceeded your rate limit
- Check
Retry-Afterheader for when to retry - Consider upgrading your plan for higher limits
Common Questions
How do I create an API key?
Generate keys under Settings > API Keys in the dashboard, viaarmor api-keys create --name ... --scope ..., or by POSTing to /api/v1/api-keys with an admin key. Name keys after the integration that uses them (“airflow-prod”, “ci-pipeline”) so rotation and revocation stay auditable. The plaintext key is shown only once at creation.
Which scope should my API key have?
Useread-only for monitoring, dashboards, and CI checks that only query state. Use read-write when you need to trigger freshness or schema refreshes. Reserve admin for key management automation itself. Follow least privilege: most integrations only need read-only.
What does the aa_live_ prefix on a key mean?
All AnomalyArmor API keys start withaa_live_ followed by a random secret, making them easy to detect with secret scanners and grep over source trees. Treat the full string as sensitive. If you see one committed to git or pasted in logs, revoke it immediately from Settings > API Keys.
How do I rotate or revoke an API key?
Create the replacement key first, roll it out to the consumer, then revoke the old key via the dashboard,armor api-keys revoke <key-id>, or DELETE /api/v1/api-keys/{key-id} with an admin token. Revocation takes effect immediately and cannot be undone, so keep the new key live before cutting the old one.
Where should I store API keys in code?
Read the key from theARMOR_API_KEY environment variable (Python SDK / CLI) or ANOMALYARMOR_API_KEY (TypeScript SDK CLI shim), and inject it from a secrets manager in production. Never hardcode keys in source, Docker images, or Jupyter notebooks. Use separate keys per environment so a dev leak can’t touch prod.
Why am I getting 403 Forbidden when my key works elsewhere?
403 means the key is valid but doesn’t have the scope the endpoint requires. Write endpoints (freshness refresh, schema refresh, create-metric) needread-write; key management needs admin. The error body shows current_scope and required_scope so you can pick the right key.