Prerequisites
- An AnomalyArmor account with at least one connected data source
- Python 3.9+ installed
- An API key (create in Settings > API Keys)
Step 1: Install the SDK
Step 2: Configure Authentication
Store your API key securely. You have two options: Option A: Environment variable (recommended for CI/CD)Step 3: Verify Connection
Test that everything is working:Step 4: Check Data Freshness
The most common integration pattern is checking data freshness before running a pipeline. Here’s a complete example:Step 5: Add Data Quality Checks
Expand your integration with validity and referential integrity checks:Step 6: Create a Quality Gate
Combine all checks into a single quality gate function:Step 7: CLI Integration
For shell scripts and CI/CD, use the CLI directly:Common Patterns
Pattern 1: Pre-ETL Validation
Run checks before ETL starts:Pattern 2: Post-ETL Validation
Verify output quality after ETL:Pattern 3: Continuous Monitoring
Schedule regular quality checks:Next Steps
Common Questions
Where do I get an API key to start?
Sign in to app.anomalyarmor.ai, open Settings → API Keys, and click Create Key. New keys are shown once - copy to a password manager or secrets manager immediately. Set the scope toread-only for pipeline gating or read-write if your integration needs to create metrics or acknowledge alerts.
Should I use the Python SDK or raw REST calls for my first integration?
Python SDK if you’re in Python or Airflow - it handles pagination, retries on 429, and error typing for you. Raw REST (curl or requests) if you’re in a different language, want zero dependencies, or are prototyping a webhook handler. Both paths are first-class.
How do I test an integration without affecting production monitoring?
Create a separate AnomalyArmor workspace (or use a sandbox project) with a non-production database connection. Integrations there can create/delete monitors freely without touching prod. When ready, swap the API key to production and re-run against real endpoints.What’s the lightest possible first integration?
A freshness check at the start of your pipeline: one API call, one conditional exit.GET /api/v1/freshness/check?asset=my_table returns whether the table meets its SLA. If no, abort the pipeline. This pattern is 5 lines of code and catches the most common data issue (stale upstream).
dbt Integration
Add quality gates to dbt workflows
GitHub Actions
Run checks in CI/CD pipelines
Airflow Integration
Integrate with Apache Airflow
API Reference
Full API documentation
