HTTP API Reference
Use these endpoints to retrieve the latest collected CPU and RAM metrics programmatically.
GET /api/metrics
Returns the most recently collected CPU and RAM metrics in JSON format.
Response fields: cpu_percent, ram_used_mb, ram_available_mb, ram_total_mb, ram_percent, collected_at, collection_status
Example response: { "cpu_percent": 12.4, "ram_used_mb": 312, "ram_available_mb": 712, "ram_total_mb": 1024, "ram_percent": 30.5, "collected_at": "2024-01-01T12:00:00Z", "collection_status": "ok" }
GET /api/health
Returns the operational status of the monitor process including last collection and forwarding outcomes.
Response fields: status, last_collection_at, last_collection_status, last_forward_at, last_forward_status
Base URL: http://<gateway-ip>:<port>
No authentication is required to access these endpoints.