http://localhost:8080
For production deployments, replace with your actual domain.
Currently operates in development mode without authentication. For production:
Authorization: Bearer <your-api-key>Endpoint: POST /api/jobs
Description: Submit a new streaming or batch processing job
Request Body:
{
"id": "job-123",
"name": "Click Stream Analysis",
"type": "STREAMING",
"config": {
"source": "events",
"sink": "dashboard",
"parallelism": 4,
"checkpointInterval": 60000,
"maxRetries": 3
}
}Response: 201 Created
{
"jobId": "job-123",
"state": "SUBMITTED",
"startTime": null,
"endTime": null,
"eventsProcessed": 0,
"lastCheckpoint": null,
"error": null
}Endpoint: GET /api/jobs/{jobId}
Description: Retrieve current status of a job
Response: 200 OK
{
"jobId": "job-123",
"state": "RUNNING",
"startTime": "2025-12-22T20:00:00Z",
"endTime": null,
"eventsProcessed": 125000,
"lastCheckpoint": "2025-12-22T20:05:00Z",
"error": null
}Job States:
SUBMITTED- Job accepted but not yet startedRUNNING- Currently processingPAUSED- Temporarily stoppedCOMPLETED- Successfully finishedFAILED- Terminated with errorCANCELLED- Manually cancelled
Endpoint: GET /api/jobs
Description: Get all jobs in the system
Response: 200 OK
[
{
"jobId": "job-123",
"state": "RUNNING",
"startTime": "2025-12-22T20:00:00Z",
"eventsProcessed": 125000
},
{
"jobId": "job-456",
"state": "COMPLETED",
"startTime": "2025-12-22T19:00:00Z",
"endTime": "2025-12-22T19:30:00Z",
"eventsProcessed": 500000
}
]Endpoint: POST /api/jobs/{jobId}/pause
Description: Pause a running job (state persisted)
Response: 200 OK
{
"jobId": "job-123",
"state": "PAUSED",
"eventsProcessed": 125000
}Endpoint: POST /api/jobs/{jobId}/resume
Description: Resume a paused job from last checkpoint
Response: 200 OK
{
"jobId": "job-123",
"state": "RUNNING"
}Endpoint: DELETE /api/jobs/{jobId}
Description: Cancel and remove a job
Response: 200 OK
{
"jobId": "job-123",
"state": "CANCELLED",
"endTime": "2025-12-22T20:10:00Z"
}Endpoint: POST /api/ingest/event
Description: Submit a single event for processing
Request Body:
{
"id": "evt-001",
"type": "click",
"timestamp": "2025-12-22T20:00:00Z",
"source": "web-app",
"payload": {
"value": 100,
"userId": "user-123",
"page": "/products"
},
"metadata": {
"userAgent": "Mozilla/5.0",
"ip": "192.168.1.1"
}
}Response: 202 Accepted
{
"status": "accepted",
"eventId": "evt-001"
}Error Response: 503 Service Unavailable (backpressure)
{
"error": "Buffer full, event dropped"
}Endpoint: POST /api/ingest/batch
Description: Submit multiple events in a single request
Request Body:
[
{
"id": "evt-001",
"type": "click",
"timestamp": "2025-12-22T20:00:00Z",
"source": "web-app",
"payload": {"value": 100}
},
{
"id": "evt-002",
"type": "click",
"timestamp": "2025-12-22T20:00:01Z",
"source": "mobile-app",
"payload": {"value": 200}
}
]Response: 202 Accepted
{
"total": 2,
"accepted": 2,
"dropped": 0
}Endpoint: GET /api/ingest/stats
Description: Retrieve ingestion metrics
Response: 200 OK
{
"eventsIngested": 1250000,
"eventsDropped": 150,
"throughput": 2083.5
}Endpoint: GET /api/metrics/cluster
Description: Get cluster-wide health metrics
Response: 200 OK
{
"timestamp": "2025-12-22T20:00:00Z",
"activeNodes": 3,
"totalJobs": 12,
"runningJobs": 5,
"eventsPerSecond": 1250.5,
"cpuUsage": 65.3,
"memoryUsage": 72.1
}{
id: string, // Unique event identifier
type: string, // Event type (e.g., "click", "purchase")
timestamp: ISO8601, // Event timestamp
source: string, // Source identifier
payload: object, // Event data (flexible schema)
metadata: object // Additional metadata
}{
id: string,
name: string,
type: "STREAMING" | "BATCH",
config: {
source: string,
sink: string,
parallelism: number,
checkpointInterval: number, // milliseconds
maxRetries: number
}
}{
jobId: string,
state: JobState,
startTime: ISO8601 | null,
endTime: ISO8601 | null,
eventsProcessed: number,
lastCheckpoint: ISO8601 | null,
error: string | null
}| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 202 | Accepted (async processing) |
| 400 | Bad Request (invalid input) |
| 404 | Not Found |
| 500 | Internal Server Error |
| 503 | Service Unavailable (backpressure) |
Default limits:
- Event Ingestion: 10,000 events/second per node
- API Requests: 1,000 requests/minute
When limits are exceeded, returns 429 Too Many Requests.
Endpoint: ws://localhost:8080/ws/metrics
Description: Subscribe to real-time cluster and job metrics
Message Format:
{
"type": "metrics",
"timestamp": "2025-12-22T20:00:00Z",
"data": {
"eventsPerSecond": 1250.5,
"cpuUsage": 65.3,
"memoryUsage": 72.1
}
}Connection Example:
const ws = new WebSocket('ws://localhost:8080/ws/metrics');
ws.onmessage = (event) => {
const metrics = JSON.parse(event.data);
console.log('Metrics:', metrics);
};- Submit Job
curl -X POST http://localhost:8080/api/jobs \
-H "Content-Type: application/json" \
-d @job-definition.json- Ingest Events
curl -X POST http://localhost:8080/api/ingest/event \
-H "Content-Type: application/json" \
-d @event.json- Monitor Status
curl http://localhost:8080/api/jobs/job-123- Pause if Needed
curl -X POST http://localhost:8080/api/jobs/job-123/pause- Resume
curl -X POST http://localhost:8080/api/jobs/job-123/resume- Cancel When Done
curl -X DELETE http://localhost:8080/api/jobs/job-123For more examples, see the GitHub repository.