Appearance
Server Metrics API Reference
This guide documents how to submit server metrics to Uptinio.
Authentication
This endpoint requires authentication using a Project API Token or a User Authentication Token:
bash
Authorization: Bearer YOUR_PROJECT_API_TOKEN
# or
Authorization: Bearer YOUR_USER_AUTHENTICATION_TOKENSubmit Server Metrics
Submit metrics for a server. If the server does not exist yet, it will be created using the provided attributes.
http
POST /api/v1/server_metrics
Authorization: Bearer YOUR_PROJECT_API_TOKEN
Content-Type: application/jsonRequest Body
json
{
"attributes": {
"motherboard_id": "unique_mb_id_123",
"mac_address": "00-0a-95-9d-67-16",
"cpu_cores": 4,
"hostname": "my-server",
"public_ip": "203.0.113.10",
"operating_system": "Ubuntu 22.04",
"kernel_version": "6.8.0",
"disk_total_bytes": 512000000000,
"memory_total_bytes": 17179869184
},
"metrics": [
{ "metric": "cpu_used", "value": 70.0, "timestamp": "2025-05-01T10:00:00Z" },
{ "metric": "mem_used_b", "value": 6000000000.0, "timestamp": "2025-05-01T10:00:00Z" }
],
"agent_version": "1.2.3"
}Notes / Validation
attributes.motherboard_idis required and cannot be"unknown".agent_versionis required and cannot be"unknown".metricsis required (array). Very large payloads may be truncated server-side.
Response (201 Created)
json
{
"success_count": 2,
"failure_count": 0,
"message": "All metrics were successfully created"
}If some metrics are invalid, you may still receive 201 with failure_count > 0 and an errors list.