Integrate SEER with your applications and scripts
SEER uses API keys for authentication. All API requests must include your API key in the Authorization header.
# Include in request headers
Authorization: Bearer df_your_api_key_here
# Example with curl
curl -H "Authorization: Bearer df_your_api_key_here" \
https://your-domain.com/api/v1/pipelinesSend status updates from your scripts to SEER:
POST /api/pipelines/{pipeline_id}/notify{
"status": "running|success|failed",
"message": "Optional status message",
"metadata": {
"execution_time": 1234,
"records_processed": 500
}
}# Python example
import requests
import json
def notify_seer(pipeline_id, status, message="", metadata=None):
url = f"https://your-domain.com/api/pipelines/{pipeline_id}/notify"
headers = {
"Authorization": "Bearer df_your_api_key_here",
"Content-Type": "application/json"
}
data = {
"status": status,
"message": message,
"metadata": metadata or {}
}
response = requests.post(url, headers=headers, json=data)
return response.status_code == 200
# Usage in your script
notify_seer("your-pipeline-id", "running", "Starting data processing")
# ... your script logic ...
notify_seer("your-pipeline-id", "success", "Processed 1000 records")SEER implements rate limiting to ensure fair usage and system stability:
When you exceed rate limits, the API returns a 429 status code. Implement exponential backoff:
# Python example with retry logic
import time
import requests
def notify_with_retry(pipeline_id, status, message="", max_retries=3):
for attempt in range(max_retries):
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
return True
elif response.status_code == 429:
# Rate limited, wait and retry
wait_time = 2 ** attempt # Exponential backoff
time.sleep(wait_time)
else:
# Other error, don't retry
break
return False