Webhook Sink
The Webhook sink sends generated data to HTTP endpoints. It’s useful for:
- Real-time data integration with web services
- Triggering workflows in other systems
- Sending notifications or alerts
Configuration
{
"sink": {
"type": "webhook",
"params": {
"url": "https://api.example.com/webhook",
"headers": {
"Authorization": "Bearer token"
},
"timeout": 30
}
}
}Configuration Options
url(required): The HTTP endpoint URLheaders(optional): Additional HTTP headers to include in the requesttimeout(optional): Request timeout in seconds (default:30)
The sink always sends requests with Content-Type: application/json. You do not need to include it in headers, and it cannot be removed.
Examples
Basic Usage
{
"schema": {
"id": "$uuid",
"name": "$name",
"email": "$email",
"timestamp": "$timestamp"
},
"sink": {
"type": "webhook",
"params": {
"url": "https://api.example.com/webhook"
}
}
}With Authentication
{
"schema": {
"id": "$uuid",
"name": "$name",
"email": "$email",
"timestamp": "$timestamp"
},
"sink": {
"type": "webhook",
"params": {
"url": "https://api.example.com/webhook",
"headers": {
"Authorization": "Bearer your-token-here",
"X-Custom-Header": "value"
},
"timeout": 60
}
}
}Request Format
Each record is sent as a JSON object in a single POST request:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "John Doe",
"email": "[email protected]",
"timestamp": 1710503445
}Error Handling
If the endpoint returns a non-2xx status code, the sink raises an exception and generation stops. There are no automatic retries — each record is attempted once.
Security
For secure endpoints, you can configure:
- HTTPS URLs
- Authentication headers (Bearer tokens, API keys, etc.)
- Custom security headers
SSL certificate verification uses the system default (enabled). It is not configurable via the sink.
Last updated on