Logs API

The logs backend exposes a JSON HTTP API consumed by the UI extension via ArgoCD’s proxy at /extensions/logs/.

Endpoints

Query logs

GET /api/v1/logs?namespace={ns}&pod={pod}&severity={severity}&limit={limit}

Query log entries from Loki with optional filters.

Parameters:

NameTypeRequiredDefaultDescription
namespacestringYes-Kubernetes namespace
podstringNo-Filter by pod name
resourcestringNo-Deployment or StatefulSet name
kindstringNo-Resource kind (Deployment, StatefulSet)
containerstringNo-Container name
filterstringNo-Free-text line filter
severitystringNo-Comma-separated: debug, info, warn, error
startstringNo1h agoRFC3339 timestamp
endstringNonowRFC3339 timestamp
limitintegerNo500Max entries (1-5000)
directionstringNobackwardforward or backward

Response:

{
  "entries": [
    {
      "timestamp": "2026-03-18T10:30:45.123Z",
      "line": "Starting application server on port 8080",
      "severity": "info",
      "labels": {
        "namespace": "default",
        "pod": "app-abc123",
        "container": "app"
      }
    }
  ],
  "stats": {
    "totalEntries": 42,
    "bytesProcessed": 8192
  }
}

Discover labels

GET /api/v1/logs/labels?namespace={ns}

List available log label names for a namespace.

Parameters:

NameTypeRequiredDescription
namespacestringYesKubernetes namespace
startstringNoRFC3339 timestamp (default: 1h ago)
endstringNoRFC3339 timestamp (default: now)

Response:

["namespace", "pod", "container", "cluster", "app"]

Get label values

GET /api/v1/logs/label/{name}/values?namespace={ns}

Get distinct values for a specific label.

Parameters:

NameTypeRequiredDescription
namepathYesLabel name
namespacestringYesKubernetes namespace

Response:

["app-abc123", "app-def456"]

Log volume

GET /api/v1/logs/volume?namespace={ns}&pod={pod}

Get log entry count bucketed by time. Used for volume charts.

Parameters:

Same as query logs (namespace, pod, resource, kind, container, filter, severity, start, end).

Response:

{
  "series": [
    { "time": "2026-03-18T10:30:00Z", "value": 42.0 },
    { "time": "2026-03-18T10:31:00Z", "value": 38.0 }
  ]
}

Step size is calculated automatically based on time range (30s for 15min, 1min for 1h, up to 1h for >24h).

Error responses

{
  "error": "namespace is required"
}
StatusDescription
400Missing or invalid parameter
502Loki query failed or unreachable