API Authentication

Secure your API requests with proper authentication and key management

Getting Your API Key
Create and manage API keys from your dashboard

Creating an API Key

  1. Log in to your SEER dashboard
  2. Navigate to Settings → API Keys
  3. Click "Generate New Key"
  4. Give your key a descriptive name (e.g., "Production ETL")
  5. Copy the key immediately (it won't be shown again)

Important: Save your API key securely. It cannot be retrieved after initial creation.

Using Your API Key
Include the key in your API requests

Authentication Header

Include your API key in the Authorization header:

curl -X POST https://seer.ansrstudio.com/api/monitoring \
  -H "Authorization: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"pipeline_name": "ETL", "status": "success"}'

Python Example

import requests

headers = {
    "Authorization": "YOUR_API_KEY",
    "Content-Type": "application/json"
}

data = {
    "pipeline_name": "ETL Pipeline",
    "status": "success"
}

response = requests.post(
    "https://seer.ansrstudio.com/api/monitoring",
    headers=headers,
    json=data
)

Using SEER Python SDK

from seerpy import SEER

# API key is passed during initialization
seer = SEER(api_key="YOUR_API_KEY")

# No need to manually add headers
seer.log_success("ETL Pipeline", metadata={...})
Security Best Practices
Keep your API keys secure

DO:

  • Store API keys in environment variables
  • Use secrets management tools (AWS Secrets Manager, HashiCorp Vault)
  • Rotate keys periodically (every 90 days recommended)
  • Create separate keys for different environments (dev, staging, prod)
  • Revoke keys immediately if compromised
  • Use descriptive names to track key usage

DON'T:

  • Commit API keys to version control (Git)
  • Share keys via email or messaging apps
  • Hardcode keys in source code
  • Use the same key across multiple projects
  • Log API keys in application logs

Security Alert: If you accidentally expose an API key, revoke it immediately from the dashboard and generate a new one.

Managing Multiple Keys
Organize keys for different use cases

Recommended Key Strategy

Production Key

For live production workloads

Staging Key

For pre-production testing

Development Key

For local development and testing

CI/CD Key

For automated testing pipelines

Troubleshooting Authentication
Common authentication issues and solutions

401 Unauthorized Error

Possible causes:

  • Missing Authorization header
  • Invalid or expired API key
  • Key has been revoked
  • Typo in the API key

429 Rate Limit Error

You've exceeded 100 requests per minute. Implement exponential backoff or reduce request frequency.