Logs API

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

Authorization

Every data endpoint requires the Argocd-Application-Name header (namespace:name format, set automatically by ArgoCD’s proxy). The backend returns 403 if the header is missing or if the requested namespace is not managed by that Application (its destination namespace plus namespaces in status.resources). The backend needs get on applications.argoproj.io for this lookup; the Helm chart grants it by default.

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)
podsstringNoComma-separated pod names to scope the query

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
podsstringNoComma-separated pod names to scope the query

Response:

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

Error responses

{
  "error": "namespace is required"
}
StatusDescription
400Missing or invalid parameter
403Namespace authorization failed (missing header or namespace not managed by the Application)
502Loki query failed or unreachable