Available API Endpoints
System
GET
/api/health
Health check endpoint - returns system status and version
GET
/api/dashboard
Get complete dashboard data including sentiment, sources, and recent batches
Trackers
GET
/api/trackers
List all configured trackers
GET
/api/trackers/:id
Get detailed information about a specific tracker
GET
/api/trackers/:id/snapshot
Get current snapshot for tracker (latest sentiment data)
GET
/api/trackers/:id/timeseries
Get time-series data for tracker (requires bucket and from params)
DELETE
/api/trackers/:id/statistics
π Delete all statistics for tracker (admin only)
DELETE
/api/trackers/:id/statistics/:bucket
π Delete statistics for specific time bucket (admin only)
Sources
GET
/api/sources
List all configured sources (Telegram, Discord, Twitter)
GET
/api/sources/:id
Get detailed information about a specific source
GET
/api/sources/:id/snapshot
Get current snapshot for source (latest sentiment data)
DELETE
/api/sources/:id/statistics
π Delete all statistics for source (admin only)
Users
GET
/api/users
List users with filtering by platform, tracker, messages, sentiment, or tags
GET
/api/users/:id
Get detailed information about a specific user
GET
/api/users/:id/sentiment-history
Get sentiment history for a user across trackers
GET
/api/users/top/active
Get most active users (by message count)
Admin π
GET
/api/admin/stats
Get system statistics (database size, memory, queue depth)
POST
/api/admin/reload-config
Reload configuration from config.toml without restart
POST
/api/admin/cleanup
Run cleanup tasks (debug_traces, old_batches, or all)
π Authentication Required:
Most endpoints require API authentication. Include your API key in requests:
curl -H "Authorization: Bearer YOUR_API_KEY" /api/trackers
Admin endpoints (π) require the admin API key from .env file
View-only keys can only access GET endpoints
Base URL:
Response Format: JSON
Public Endpoints: /api/health (no auth required)