OpenConsole API
Kubernetes workloads across several clusters, limited to what your roles allow; every action is audited.
Sign in with an API key: Authorization: Bearer oc_… (create one under your account → API keys).
A key can do at most what its owner can, as far as the admin's API access policy lets keys go, and only
what the key itself was given. GET /api/auth/me shows who you are and what the key reaches.
Cluster: X-OpenConsole-Cluster: <name or id> on each request; without it, the owner's selected cluster.
Responses name the cluster that answered in the same header (its id). A WebSocket works on the cluster
named when its ticket was requested.
WebSockets (/ws/…, live logs, shell, events): first POST /api/ws-ticket with {"path": "/ws/…"},
then connect to that path with ?ticket=<ticket> (single use, short-lived). For one command or a log
snapshot, use the plain HTTP endpoints instead: POST …/pods/{name}/exec, GET …/pods/{name}/logs.
Errors are problem details (RFC 9457, application/problem+json) with one extra member, error,
the reason code to switch on; detail is optional English text for a human (which field, which name):
{"type": "about:blank", "title": "Forbidden", "status": 403, "error": "forbidden"}. The codes are
listed in the Problem schema. The ones you will meet most:
401 unauthorized,api_key_expired,api_key_revoked: the key (or session) is not valid.403: the key is valid but may not do this. Reasons:forbidden(no permission here),api_access_policy(the owner has it, the admin's policy keeps it from keys),api_access_off(the policy turns API access off for this user),api_key_not_allowed(web session only),feature_disabled(switched off by the operator),admin_only,password_change_required.429 rate_limited(10 requests per second per key, bursts of 30; waitRetry-Afterseconds) ortoo_many_sessions(too many open shells / log streams).- The cluster failed a read:
403 cluster_forbidden(OpenConsole's credentials for the cluster may not read this; see its ClusterRole),404 not_found,502 cluster_unreachable,503 not_connected,504 cluster_timeout. - An unknown
/api/…or/ws/…path:404 not_found; a known path with the wrong method:405 method_not_allowedwith anAllowheader.
Every action and every resource read made with a key is written to the audit log with the key's name;
helper calls such as /api/auth/me and /api/ws-ticket are not.
Authentication
- HTTP: Bearer Auth
An API key (oc_…) or a web session token.
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |