Server management
Comprehensive server management API for monitoring system health, checking readiness status, and performing graceful shutdown operations. Essential for deployment orchestration and container health checks.
Authentication
None
No authentication required for server management endpoints
Endpoints
Health Check
GET/server/healthRetrieve detailed system health metrics including operating system information, hardware specifications, network configuration, and resource utilization. Provides comprehensive diagnostics for monitoring, troubleshooting, and capacity planning.
Response
200System health information retrieved successfully
platformstringREQUIREDOperating system platform (e.g., 'Linux', 'Darwin', 'Windows')
Example:
"Darwin"platform_releasestringREQUIREDPlatform release version
Example:
"24.6.0"platform_versionstringREQUIREDDetailed platform version string
Example:
"Darwin Kernel Version 24.6.0"architecturestringREQUIREDSystem architecture (e.g., 'x86_64', 'arm64', 'aarch64')
Example:
"arm64"hostnamestringREQUIREDSystem hostname
Example:
"hostname.local"ip_addressstringREQUIREDPrimary IP address of the server
Example:
"192.168.1.100"mac_addressstringREQUIREDPrimary MAC address of the server
Example:
"aa:bb:cc:dd:ee:ff"processorstringREQUIREDProcessor type
Example:
"arm"ramstringREQUIREDTotal system RAM
Example:
"16 GB"Error Codes
401
Unauthorized
Invalid or missing authentication token
403
Forbidden
Insufficient permissions for server management operations
500
Internal Server Error
Server encountered an error while processing the request
503
Service Unavailable
Server is temporarily unable to handle the request
Code examples - Health Check
- cURL
- JavaScript
- Python
BASH Request (cURL)
curl -X GET "http://localhost:8000/server/health"
JavaScript Request (JavaScript)
const response = await fetch('http://localhost:8000/server/health', {
method: 'GET'
});
const health = await response.json();
console.log('Server health:', health);
Python Request (Python)
import requests
response = requests.get(
'http://localhost:8000/server/health'
)
health_info = response.json()
print(f"Platform: {health_info['platform']}")
print(f"RAM: {health_info['ram']}")