REST & WebSocket API Reference
The BizDone API is organized around REST for data ingestion and management, and WebSocket for real-time streaming. All API access is over HTTPS and requires authentication.
https://api.bizdone.ru/v2
All API endpoints are versioned. The current version is v2.
Authentication
All requests require an API key passed in the Authorization header:
Authorization: Bearer bd_live_YOUR_API_KEY
For WebSocket connections, pass the API key as a query parameter:
wss://api.bizdone.ru/v2/stream?api_key=bd_live_YOUR_API_KEY&topics=my-topic
POST /v2/ingest
Ingest data into a BizDone stream. Accepts JSON payloads with automatic schema detection.
Request
POST /v2/ingest
Content-Type: application/json
{
"stream": "string (required)",
"data": "object (required)",
"partition_key": "string (optional)",
"timestamp": "ISO8601 (optional, defaults to server time)",
"metadata": "object (optional)"
}
Response
// 202 Accepted
{
"event_id": "evt_8f7d3a2c",
"stream": "my-stream",
"status": "accepted",
"ingested_at": "2026-03-15T10:30:00.123Z"
}
WebSocket /v2/stream
The WebSocket streaming endpoint provides a persistent, bidirectional connection for real-time data ingestion and consumption. This is the primary interface for high-throughput, low-latency data streaming.
Connection
wss://api.bizdone.ru/v2/stream?api_key=YOUR_KEY&topics=topic1,topic2&format=json
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Yes | Your BizDone API key |
topics |
string | Yes | Comma-separated list of topics to subscribe to |
format |
string | No | Message format: json (default), avro, protobuf |
compression |
string | No | Compression: none, gzip, lz4, zstd |
batch_size |
integer | No | Max events per frame (1–10000, default: 100) |
Message Format (Inbound)
Send events to a stream by sending JSON frames:
{
"type": "publish",
"stream": "my-topic",
"data": { ... },
"timestamp": "2026-03-15T10:30:00Z"
}
Message Format (Outbound)
Consumed events arrive as JSON frames:
{
"type": "message",
"stream": "my-topic",
"event_id": "evt_8f7d3a2c",
"data": { ... },
"timestamp": "2026-03-15T10:30:00.123Z",
"partition": 3,
"offset": 1048576
}
Heartbeat
Idle connections receive a heartbeat frame every 30 seconds:
{"type": "heartbeat", "server_time": "2026-03-15T10:30:30Z"}
Rate Limits
| Starter | 1M events/sec |
| Enterprise | Unlimited |
| Max frame size | 16 MB |
POST /v2/query
Run SQL-like queries against your streaming data:
POST /v2/query
Content-Type: application/json
{
"sql": "SELECT avg(amount) FROM transactions WHERE region = 'EU' WINDOW TUMBLING 5m",
"mode": "streaming"
}
Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad request — invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — insufficient permissions |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
| 503 | Service temporarily unavailable |