System Dashboard
Active Bots
-
Uptime
-
Memory Usage
-
Active Tasks
-
System Health
Healthy
API Server
β OK
Database
β OK
Bot Orchestrator
β OK
Recent Activity
System initialized
Just now
Telegram Bots Management
API Documentation
Introduction
Welcome to the Enterprise Business Management API. This RESTful API provides comprehensive access to manage your business operations, including bot orchestration, metrics monitoring, and system health checks.
Base URL
https://api.example.com/api
Authentication
All API requests require authentication using JWT tokens. Include the token in the Authorization header:
Request Header
Authorization: Bearer YOUR_TOKEN_HERE
Login Endpoint
POST
/auth/login
Request Body
{
"username": "admin",
"password": "password123"
}
Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 3600
}
Error Handling
The API uses standard HTTP status codes and returns error details in JSON format:
Error Response
{
"error": "Unauthorized",
"message": "Invalid or expired token",
"status": 401
}
| Status Code | Description |
|---|---|
200 |
Success |
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Authentication required |
403 |
Forbidden - Insufficient permissions |
404 |
Not Found - Resource doesn't exist |
500 |
Internal Server Error |
Bots Management
Get All Bots
GET
/bots
Retrieve a list of all registered Telegram bots with their health status.
Response
{
"bots": [
{
"bot_id": "1753402066.634308",
"bot_name": "AI ΠΠ Π΄ΠΎΠΊΠΈ",
"health": 1.0,
"restarts": 1,
"messages_total": 1234
}
],
"total": 24
}
Get Bot Details
GET
/bots/{bot_id}
Metrics
Get System Metrics
GET
/metrics
Retrieve Prometheus-formatted system metrics including bot health, memory usage, and performance data.
Response (Prometheus Format)
# HELP telegram_bot_health Bot health status
# TYPE telegram_bot_health gauge
telegram_bot_health{bot_id="...",bot_name="..."} 1.0
# HELP orchestrator_uptime_seconds Orchestrator uptime
# TYPE orchestrator_uptime_seconds gauge
orchestrator_uptime_seconds 317346.114045
Health Check
System Health
GET
/health
Check the overall system health status.
Response
{
"status": "healthy",
"uptime": 317346,
"memory_mb": 313.86,
"active_tasks": 28,
"timestamp": "2024-01-15T10:30:00Z"
}
System Metrics
Performance Metrics
CPU Time (Total)
-
Virtual Memory
-
Resident Memory
-
Open File Descriptors
-
Garbage Collection
Gen 0 Collections
-
Gen 1 Collections
-
Gen 2 Collections
-
Bot Statistics
| Bot Name | Health | Restarts | Messages |
|---|