API - hosts, metrics, events, logs and security
All paths are relative to https://api.wakora.io/v1/ and need Authorization: Bearer <token>; see the overview for scopes and errors.
Hosts and inventory
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /hosts | read | The fleet: every host with status, meters, agent version. |
| GET | /hosts/overview?server=<uuid> | read | One host's overview block: meters, services, sites, open incidents. |
| GET | /hosts/{uuid} | read | Host detail. |
| PATCH | /hosts/{uuid} | admin | Edit the host's identity: label, tags (comma-separated), comment. |
| GET | /hosts/{uuid}/inventory?kind= | read | Discovery inventory; kind filters: process, port, package, unit, vhost, service, cronjob, docker, guest, device, net. |
| GET | /hosts/{uuid}/checks | read | Latest result of every check on the host. |
| GET | /hosts/{uuid}/uptime | read | Heartbeat-minute uptime ratio over a window. |
| GET | /hosts/{uuid}/uptime-daily | read | Per-day uptime. |
| GET | /hosts/{uuid}/rules | read | Alert rules as they effectively apply to this host, per-host overrides included. |
Metrics
Metric names and tags are in the metrics reference. Series are returned at the resolution the window allows: raw points for short windows, one-minute, one-hour or one-day rollups for longer ones, each point carrying min, max, average and the last value.
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /metrics?server=&name=&from=&to= | read | One metric's series on one host. name is an exact metric name. |
| GET | /metrics/names?server= | read | Distinct metric names seen in the last 24 hours; omit server for the whole workspace. Use it to discover what a host produces before querying. |
| GET | /metrics/latest?server=&name= | read | Latest value per series. |
| GET | /metrics/latest-by-tag?server=&name=&tag= | read | Latest value per tag value: per mount, per site, per pool. |
| GET | /metrics/batch?server=&names= | read | Several series in one call; names is a comma-separated list of exact names. |
| GET | /metrics/sum-by-tag?server=&name=&tag=&from=&to= | read | Window sums per tag value, for counters that must be summed rather than averaged. |
Gauges (a certificate's days left, a queue depth) are read as the last value of a bucket; rates are averaged. A series that stopped is simply absent past its last point; the API never fills zeros.
Events, checks, insights
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /events?server=&kind=&from=&to=&limit= | read | The event feed: up and down, agent updates, deploys, discovery changes, integrity changes, anomalies, insights, staged-change notices. One kind per call. |
| GET | /events/daily?tz= | read | Per-day event counts by category, days sliced in the given IANA time zone. |
| GET | /checks?server= | read | Latest check results fleet-wide or for one host. |
| GET | /insights | read | Insights: N+1 query findings, disk-full forecasts, pool sizing hints, deployment audits. |
Ask for one kind per call rather than pulling everything and filtering: the feed is
newest-first with a limit, and on a busy workspace a wide pull returns hours, not days.
Logs
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /logs?q2=&server=&service=&level=&from=&to= | read | Full-text search; q2 is the needle (whole tokens match through the index, a phrase or a token containing _ falls back to a substring match). |
| GET | /logs/tail?since=&server=&service=&level= | read | Live tail: lines after the cursor; the answer carries the next since. |
| GET | /logs/stats?server=&service=&level=&q2= | read | Volume and level counters over the same filters. |
| GET | /logs/daily?tz= | read | Per-day line counts by level. |
Log windows are clamped to the log search depth of your plan. Lines arrive already redacted by the agent; what the API returns is what the console shows.
Security
| Method | Endpoint | Scope | What it does |
|---|---|---|---|
| GET | /security/overview?server= | read | Pending updates, SSH doors, integrity changes, hardening score and CVE counters for the workspace or one host. |
| GET | /security/daily?tz= | read | Per-day security signals: authentication failures, root logins, integrity changes, brute-force alerts, OOM kills. |
| GET | /security/cve | read | Known vulnerabilities matched against installed packages: identifier, severity and who assigned it, fixed version where one exists in the host's release, exploited-in-the-wild flag, affected hosts. |
Related
- APM, RUM, uptime and transactions
- Incidents and alerting
- Prometheus export for pulling host meters into your own stack