/api/qmail/status
GETService status endpoint that returns beacon state, database statistics, and QMail server information. Use this endpoint to monitor the overall health and configuration of the QMail system.
Description
The /api/qmail/status endpoint provides a comprehensive view of the QMail system's current state. It returns information about the beacon process, local database statistics, and the list of configured RAIDA servers.
This endpoint is ideal for:
- Monitoring beacon health and error state
- Tracking mailbox statistics (inbox, sent, trash, unread counts)
- Verifying RAIDA server configuration and connectivity
- Dashboards and administrative status panels
Interactive API Tester
Test this Endpoint
Parameters
This endpoint requires no parameters.
Response
Success Response Properties
beacon Object
database Object
servers Object
Success Response Example
{
"success": true,
"beacon": {
"running": true,
"last_tell_timestamp": 1735689800,
"backoff_seconds": 0,
"consecutive_errors": 0
},
"database": {
"open": true,
"inbox_count": 42,
"sent_count": 18,
"trash_count": 5,
"unread_count": 7,
"contact_count": 23
},
"servers": {
"count": 25,
"data_stripes": 5,
"list": [
{
"raida_index": 0,
"ip": "1.2.3.4",
"port": 18000,
"region": "us-east",
"hostname": "raida0.cloudcoin.global"
},
{
"raida_index": 1,
"ip": "5.6.7.8",
"port": 18000,
"region": "eu-west",
"hostname": "raida1.cloudcoin.global"
}
]
}
}
Examples
cURL
curl "http://localhost:8080/api/qmail/status"
JavaScript (fetch)
const response = await fetch('http://localhost:8080/api/qmail/status');
const result = await response.json();
if (result.success) {
console.log('Beacon running:', result.beacon.running);
console.log('Unread emails:', result.database.unread_count);
console.log('Inbox count:', result.database.inbox_count);
console.log('RAIDA servers:', result.servers.count);
if (result.beacon.consecutive_errors > 0) {
console.warn('Beacon errors:', result.beacon.consecutive_errors);
}
}
Python
import requests
response = requests.get('http://localhost:8080/api/qmail/status')
data = response.json()
if data['success']:
beacon = data['beacon']
db = data['database']
servers = data['servers']
print(f"Beacon running: {beacon['running']}")
print(f"Consecutive errors: {beacon['consecutive_errors']}")
print(f"Database open: {db['open']}")
print(f"Inbox: {db['inbox_count']}, Unread: {db['unread_count']}")
print(f"Sent: {db['sent_count']}, Trash: {db['trash_count']}")
print(f"Contacts: {db['contact_count']}")
print(f"RAIDA servers: {servers['count']} ({servers['data_stripes']} stripes)")
for server in servers['list']:
print(f" [{server['raida_index']}] {server['hostname']} - {server['region']}")
Use Cases
- System Dashboard: Display real-time beacon health, mailbox counts, and server topology in an admin panel
- Health Monitoring: Track beacon errors and backoff state to detect connectivity issues early
- Mailbox Overview: Show inbox, sent, trash, and unread counts without fetching individual messages
- Server Inventory: Enumerate configured RAIDA servers and verify regional distribution
- Startup Validation: Confirm the database is open and beacon is running before making other API calls
Important Notes
This is a public endpoint that requires no authentication. It is designed to be lightweight and respond quickly for monitoring purposes.
When the beacon encounters errors, it uses an exponential backoff strategy. The backoff_seconds field shows the current delay, and consecutive_errors indicates how many failures have occurred in a row. Both reset to 0 on a successful poll cycle.
The servers.list array contains all configured RAIDA servers (typically 25). When displaying server information, consider paginating or summarizing the list for user interfaces.