DaytonaDocs

Logs & Usage

Console logs, entrypoint logs, and usage metrics.

Per-sandbox logs are returned as plain text; usage metrics are JSON. Logs for a live sandbox are read from its host in real time; once a sandbox reaches stopped, failed, or lost the final log is served from durable storage. See the Logs guide and Usage Metrics guide.

GET /vms/:id/logs

Fetch the sandbox's console/boot log. Live sandboxes return the current log; terminal sandboxes (stopped, failed, lost) return the persisted final log. Response is text/plain.

cURL
curl https://api.rl.trydaytona.com/vms/us1-3kTMbBWbdML5UWJHfyPyhF/logs \
  -H "Authorization: Bearer $RLP_API_KEY"
[    0.612] Booting sandbox worker-1
[    1.204] Network up: 10.64.3.17
[    1.688] Entrypoint started: node server.js

Errors

  • 404 — unknown sandbox; a terminal sandbox with no persisted log; or a live sandbox not yet placed on a host.
  • 502 — the sandbox's host did not answer; retry.

GET /vms/:id/entrypoint-logs

Fetch the entrypoint session's output (stdout/stderr of the container entrypoint running inside the sandbox), separate from the console log. Same live/terminal semantics and text/plain response as /logs.

cURL
curl https://api.rl.trydaytona.com/vms/us1-3kTMbBWbdML5UWJHfyPyhF/entrypoint-logs \
  -H "Authorization: Bearer $RLP_API_KEY"

Errors

  • 404 — unknown sandbox, no persisted log, or not placed on a host.
  • 502 — the sandbox's host did not answer; retry.

GET /vms/:id/usage

A live resource-usage sample for a placed sandbox, read from its host in real time. The usage document carries the host's current measurements (CPU, memory, disk, I/O and network counters) for this sandbox.

cURL
curl https://api.rl.trydaytona.com/vms/us1-3kTMbBWbdML5UWJHfyPyhF/usage \
  -H "Authorization: Bearer $RLP_API_KEY"
{
  "id": "us1-3kTMbBWbdML5UWJHfyPyhF",
  "runner_id": "runner-a12",
  "source": "live",
  "usage": { "...": "live per-sandbox measurements from the host" }
}

Errors

  • 404 — unknown sandbox, or the sandbox is not currently placed on a host (e.g. stopped).
  • 502 — the sandbox's host did not answer; retry.

GET /vms/:id/usage/history

Per-sandbox usage time series, for charts and post-hoc analysis. Buckets are integrals over the covered wall-clock span: normalize with duration_ms (e.g. average cores = cpu_core_s / (duration_ms / 1000)).

Query paramTypeDefaultDescription
fromRFC 3339to − 24 hLower bound (inclusive).
toRFC 3339nowUpper bound (exclusive).
resolutionstring"m""m" (minute buckets) or "h" (hourly rollups).
cURL
curl "https://api.rl.trydaytona.com/vms/us1-3kTMbBWbdML5UWJHfyPyhF/usage/history?resolution=h" \
  -H "Authorization: Bearer $RLP_API_KEY"
{
  "available": true,
  "sandbox_id": "us1-3kTMbBWbdML5UWJHfyPyhF",
  "resolution": "h",
  "periods": [
    {
      "start": "2026-07-31T14:00:00+00:00",
      "duration_ms": 3600000,
      "cpu_core_s": 1250.5,
      "mem_byte_s": 7730941132800.0,
      "mem_rss_peak": 2147483648,
      "disk_used": 1073741824,
      "io_r_bytes": 52428800,
      "io_w_bytes": 104857600,
      "net_rx_bytes": 8388608,
      "net_tx_bytes": 4194304
    }
  ]
}

When the metrics store is not configured for the deployment, the response is { "available": false, "sandbox_id": "...", "periods": [] }.

Errors

  • 404 — unknown sandbox or another project's sandbox.

GET /usage/report

Project-scoped usage report aggregated across all of the project's sandboxes, suitable for spend review. See Spending.

Query paramTypeDefaultDescription
startRFC 3339end − 1 dayLower bound (inclusive).
endRFC 3339nowUpper bound (exclusive).
resolutionstring"h""h" (hourly) or "d" (daily).
cURL
curl "https://api.rl.trydaytona.com/usage/report?resolution=d" \
  -H "Authorization: Bearer $RLP_API_KEY"
{
  "available": true,
  "resolution": "d",
  "start": "2026-07-31T00:00:00+00:00",
  "end": "2026-08-01T00:00:00+00:00",
  "items": [
    {
      "sandbox_id": "7f2e6a30-91cd-4b1f-a8d2-3c5e07b9f614",
      "interval_start": "2026-07-31T00:00:00+00:00",
      "resources": {
        "cpu_core_seconds": 43210.7,
        "mem_gib_hours": 18.4,
        "disk_bytes_max": 1073741824,
        "io_r_bytes": 524288000,
        "io_w_bytes": 1048576000,
        "net_rx_bytes": 83886080,
        "net_tx_bytes": 41943040
      }
    }
  ]
}

When the metrics store is not configured, the response is { "available": false, "items": [] }.

On this page