9. Integrations
Integrations
Advanced webhook system for real-time notifications, system integration, and automated workflow triggers.
Supported Events:
job.completed- Job finished successfully with download URL and metadatajob.failed- Job encountered an error with detailed failure informationjob.cancelled- Job was manually cancelled or timed outjob.progress- Periodic progress updates during job execution (optional)system.maintenance- Scheduled maintenance notificationsapi.rate_limit- Rate limit threshold warnings
Webhook Security Features:
- HMAC-SHA256 signature - Cryptographic payload verification using shared secret
- Timestamp validation - Prevents replay attacks with time-based verification
- IP whitelisting - Optional source IP restrictions for enhanced security
- TLS encryption - All webhook deliveries use HTTPS/TLS 1.3
- Signature verification - Complete payload integrity checking
Delivery & Reliability:
- Automatic retries - Up to 3 retry attempts with exponential backoff
- Delivery tracking - Complete success/failure monitoring and logging
- Timeout handling - 30-second response timeout with configurable settings
- Dead letter queue - Failed deliveries stored for manual retry
- Circuit breaker - Automatic endpoint disabling for persistent failures
- Rate limiting - Configurable delivery rate limits to prevent overwhelming
Webhook Payload Structure:
{
"event": "job.completed",
"timestamp": "2024-09-26T10:02:15Z",
"signature": "sha256=abc123def456...",
"delivery_id": "del_1758630144658",
"attempt": 1,
"data": {
"job_id": "appointments_1758630144658_c7511999",
"customer_id": "your-customer-id",
"procedure_name": "appointments",
"status": "completed",
"rows_processed": 45678,
"execution_time_seconds": 64.75,
"file_size_bytes": 2048576,
"s3_url": "https://secure-download-url",
"expires_at": "2024-09-26T22:02:15Z",
"output_format": "ndjson",
"compression": "gzip",
"metadata": {
"from_date": "2024-01-01",
"to_date": "2024-12-31",
"date_modifier": "Created"
}
}
}
Signature Verification:
import hmac
import hashlib
def verify_webhook_signature(payload, signature, secret):
expected_signature = hmac.new(
secret.encode('utf-8'),
payload.encode('utf-8'),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected_signature}", signature)
Configuration Options:
- Event filtering - Subscribe to specific events only
- Custom headers - Add custom HTTP headers to webhook requests
- Retry configuration - Customize retry attempts and backoff strategy
- Timeout settings - Configure response timeout values
- Batch delivery - Group multiple events into single webhook call
Monitoring & Debugging:
- Delivery logs - Complete webhook delivery history
- Response tracking - HTTP status codes and response times
- Error analysis - Detailed failure reasons and troubleshooting
- Performance metrics - Delivery success rates and latency statistics
- Test endpoints - Webhook testing and validation tools
Use Cases:
- Automated workflows - Trigger business processes when jobs complete
- Real-time notifications - Instant alerts when data extraction finishes
- System integration - Connect CipherStream to other business systems
- Data pipeline automation - Chain multiple data processing steps
- Monitoring and alerting - Track job completion and system health
- Business intelligence - Trigger report generation and dashboard updates
- Customer notifications - Inform end users when their data is ready
Was this section helpful?
What made this section unhelpful for you?
On this page
- 9. Integrations