Skip to Content
πŸŽ‰ EZMON v0.1.19 is released. Visit ezmon.web.id β†’
API Reference

πŸ“– EZMON API Reference

Base URL: https://your-hub.vercel.app

All EZMON API endpoints consume and produce JSON payloads. The API surface is partitioned into four primary modules: Agent API, Dashboard API, Internal Evaluator API, and Public Status API.


πŸ” Authentication & Authorization Headers

API ModuleAuth SchemeHeader / Transport
Agent API (/api/agent/*)Permanent Agent TokenAuthorization: Bearer <agent_token>
Evaluator API (/api/internal/*)Cron Secret KeyAuthorization: Bearer <CRON_SECRET>
Dashboard API (/api/dashboard/*)NextAuth Session JWTBrowser Session Cookie
Public API (/api/public/*)No Authentication (Bypass)Public / CORS Enabled

πŸ€– Agent API Endpoints

Lightweight endpoints designed for consumption by the static Go Agent running on your Linux nodes.

POST /api/agent/register

Registers a new agent node into a project. Supports onboarding via One-Time Registration Tokens (reg_...).

{ "projectId": "reg_1a2b3c4d5e6f...", "name": "my-server-01", "hostname": "server-01.example.com", "os": "linux", "arch": "amd64" }

POST /api/agent/heartbeat

Refreshes agent online status and updates offline_deadline_at. Called every 30 seconds.

{ "agentId": "uuid-agent-id", "heartbeatIntervalSec": 30, "graceMultiplier": 3 }

POST /api/agent/metrics

Submits host performance metrics snapshot (CPU, RAM, Disk, Load, Network, Docker count).

{ "agentId": "uuid-agent-id", "cpuPercent": 45.2, "memPercent": 62.1, "memUsedMb": 2048, "memTotalMb": 4096, "diskPercent": 38.5, "diskUsedGb": 38.5, "diskTotalGb": 100, "loadAvg1": 0.82, "loadAvg5": 0.75, "loadAvg15": 0.60, "netBytesSent": 1048576, "netBytesRecv": 2097152, "dockerRunning": 3 }

βš™οΈ Internal Evaluator Endpoints

POST /api/internal/evaluate

Triggers serverless background evaluation for offline/recovery detection, cloud monitor execution, and database retention cleanups.

  • Required Header: Authorization: Bearer <CRON_SECRET>
POST /api/internal/evaluate HTTP/1.1 Host: your-hub.vercel.app Authorization: Bearer YOUR_CRON_SECRET

πŸ“Š Dashboard API Endpoints

Registration Tokens

POST /api/dashboard/projects/reg-token

Generates a temporary single-use agent onboarding token (5-minute TTL).

  • Request: { "projectId": "uuid-project-id" }
  • Response: { "token": "reg_abc123...", "expiresAt": "2026-08-09T12:05:00Z" }

Incidents

GET /api/dashboard/incidents

Fetches incident history (query: projectId, status, page, limit).

DELETE /api/dashboard/incidents

Permanently deletes incidents.

  • Single Incident Deletion: DELETE /api/dashboard/incidents?id=uuid-incident-id
  • Bulk Clearance (Resolved): DELETE /api/dashboard/incidents?projectId=uuid&scope=resolved

Notification Channels

GET /api/dashboard/notifications

Lists all active notification channels for a project.

POST /api/dashboard/notifications

Creates a notification channel (Telegram, Discord, Webhook) with targetType scoping (all, agent, monitor).


🌐 Public Status API

GET /api/public/status/[slug]

Fetches published status page data for third-party embeds or external widgets (CORS enabled, unauthenticated).

{ "name": "Production Cluster", "slug": "prod-cluster", "overallStatus": "operational", "agents": [ { "name": "web-server-01", "status": "online", "lastSeenAt": "2026-08-09T18:30:00Z" } ], "monitors": [ { "name": "API Gateway", "type": "http", "status": "up", "latencyMs": 42 } ] }
Last updated on