Namespaces
Tenancy control plane — namespaces, OIDC group bindings, quotas, internal egress targets and machine API keys. Admin only.
postCreate Namespace
Creates a namespace owned by `owner_team` (a team URN, or transitionally a bare slug; platform admins' values are verified against Xeonr Auth and canonicalised to the URN), places it on `cluster_id` (empty: the team's default cluster, else the platform's) and provisions its dedicated runner namespace `cp-rn-<namespace>`. `namespace` must be a DNS-label slug of at most 40 characters. Team admins may not set internal targets or image pull secrets (PermissionDenied). Quotas left at zero default to 4000 mCPU, 8192 MB memory, 16 pods, 50 GiB storage and 20 volumes; a team admin may set them within the team's grant on the cluster (ResourceExhausted beyond it), and a platform admin without limit. Returns AlreadyExists for a taken name. **Access:** a platform admin, or an admin of the `owner_team` team.
postDelete Namespace
Tears down the namespace's runner namespace, deletes the record and revokes every API key owned by or bound to it. Fails with FailedPrecondition while the namespace still has API keys unless `force` is set. **Access:** admin role in the namespace (the owning team's admins, or an ADMIN-role namespace API key), or a platform admin. Other callers get NotFound.
postEnsureManagedTeamNamespace
Establishes the one immutable namespace owned by a product for a team. The product is resolved from the configured verified service principal; callers cannot select it or adopt an existing unmanaged namespace.
postGet my role
Returns whether the calling subject is a platform administrator, their teams with the namespace role each grants them, and every namespace they can see with its owning team and their role in it. It takes no parameter and reads nobody else. Namespace API keys are refused. **Access:** any authenticated person.
postGet Namespace
Returns a namespace record. A namespace the caller cannot see is reported as NotFound. **Access:** any role in the namespace, or a platform admin.
postGrant Managed Product
Grants `product` (a product ListManagedProducts returns) `role` in `namespace`: ROLE_OPERATOR (UNSPECIFIED means OPERATOR) or ROLE_VIEWER; ROLE_ADMIN is refused. The grant is pinned to the namespace's current owner team and lapses if ownership changes. Granting a product that already holds a grant replaces its role and re-pins it. A namespace with a managed policy (one a product created for itself) cannot be granted (FailedPrecondition), nor can an unowned one. Unknown products are InvalidArgument. **Access:** admin role in the namespace (the owning team's admins, or an ADMIN-role namespace API key), or a platform admin. Other callers get NotFound.
postIssue API Key
Issues a machine API key owned by this namespace with `role` (UNSPECIFIED means OPERATOR): a Xeonr Auth API key bound to the namespace, and with `workspace_ids` set, confined to those workspaces as well. `expires_at_unix` sets when it stops working (0: never). The plaintext (`xk_…`) is returned once and never again. A key issued before keys moved to Xeonr Auth (`cpk_…`) keeps working unchanged. Keys never carry platform-admin rights. **Access:** admin role in the namespace (the owning team's admins, or an ADMIN-role namespace API key), or a platform admin. Other callers get NotFound.
postList API Keys
Lists a namespace's live API keys (and its revoked ones with `include_revoked`), including its workloads' agent keys (metadata only; plaintext is never returned). `key_id` is the key's Xeonr Auth URN. **Access:** admin role in the namespace (the owning team's admins, or an ADMIN-role namespace API key), or a platform admin. Other callers get NotFound.
postList Managed Product Grants
Lists the managed-product grants on `namespace`: those its owner team made with GrantManagedProduct (`source` STORED) and those a platform operator configured (`source` CONFIGURED, which only configuration can change). `lapsed` is set on a grant whose pinned owner team no longer owns the namespace; it grants nothing. A managed product's own service account may leave `namespace` empty to list every grant made to it. **Access:** any role in the namespace, or a platform admin; a managed product sees only its own grants. Other callers get NotFound.
postList Managed Products
Lists the managed products a namespace can be granted to: each product id and the Xeonr Auth service account it acts as. Products whose namespaces the platform creates for them (Games) are not listed; they cannot be granted. **Access:** any authenticated caller.
postList Namespaces
Lists the namespaces visible to the caller, ordered by name. `page_size` 0 means 100 and is clamped to 1000; `page_token` is the opaque offset from `next_page_token`. **Access:** any authenticated caller; results are filtered to namespaces the caller can read (all of them for a platform admin).
postMove Namespace
Moves a namespace and its persistent volumes to `target_cluster_id`. The controller drains it (refuses new workloads, suspends sandboxes, scales apps to zero, waits up to 15 minutes for running jobs and then cancels them), archives each persistent volume, places the namespace on the target and provisions its runner namespace there, re-seeds each persistent volume from its archive (populated on its first mount on the target; cache and scratch volumes are dropped and rebuilt on use), deletes the source's runner namespace and volumes, and brings apps back to their desired replicas; sandboxes stay suspended until resumed. Progress is `Namespace.move`. A failure before the volumes are re-seeded rolls back to the source, which still has everything. While a move runs, workload operations in the namespace and UpdateNamespace/DeleteNamespace are refused with FailedPrecondition. With `dry_run` nothing starts and the response carries the downtime estimate. The target must be a cluster the namespace's owner team may place on (PermissionDenied otherwise, NotFound if not visible) and CONNECTED (FailedPrecondition). **Access:** a platform admin, or an admin of the namespace's owner team.
postRevoke API Key
Revokes an API key; it is refused within 30 seconds. The key stays in Xeonr Auth's audit trail. Authorisation is checked against the key's own namespace, not anything in the request. `key_id` is the URN ListApiKeys returns; a key id from before keys moved to Xeonr Auth is NotFound. **Access:** admin role in the key's namespace, or a platform admin. Other callers get NotFound.
postRevoke Managed Product
Deletes `product`'s stored grant on `namespace`; the product's next decision in the namespace finds no role. Workloads it already started are not stopped. NotFound when there is no stored grant; a CONFIGURED grant is FailedPrecondition, since only the platform's configuration can remove it. **Access:** admin role in the namespace, or a platform admin. Other callers get NotFound.
postUpdate Namespace
Updates a namespace's display name and default limits. Platform admins additionally set quotas, internal targets and image pull secrets (full replace — quotas are written as sent, 0 meaning unlimited) and may adopt or transfer ownership via `owner_team`. For everyone else those fields must be empty/zero or equal to the stored values, otherwise PermissionDenied. `allow_runc` (unset preserves it) may be changed by a team admin only when the namespace's own team owns its cluster. Re-reconciles the runner namespace afterwards. **Access:** admin role in the namespace (the owning team's admins, or an ADMIN-role namespace API key), or a platform admin. Other callers get NotFound.
Tail Logs POST
Streams a job's log from byte `from_offset` of its interleaved log (stdout and stderr in the order written); every chunk's `offset` is the position of its first byte in that log, so a client resumes from `offset + len(data)` of the last chunk it kept. For a running job this follows the pod's output live (stdout/stderr split where the job was supervised); for a terminal job it serves the copy stored on the record, both streams in their original order with the stderr flag kept. The stored copy keeps the first 256 KiB of each stream, so an ended job's log can have gaps (the offsets jump) where a stream was cut. Returns Unimplemented for a live job when the api has no cluster access. **Access:** any role in the namespace (viewer, operator or admin — via Xeonr team membership or a namespace API key), or a platform admin. **Required scopes:** `container-platform:namespaces:read`
Create Namespace POST
Creates a namespace owned by `owner_team` (a team URN, or transitionally a bare slug; platform admins' values are verified against Xeonr Auth and canonicalised to the URN), places it on `cluster_id` (empty: the team's default cluster, else the platform's) and provisions its dedicated runner namespace `cp-rn-<namespace>`. `namespace` must be a DNS-label slug of at most 40 characters. Team admins may not set internal targets or image pull secrets (PermissionDenied). Quotas left at zero default to 4000 mCPU, 8192 MB memory, 16 pods, 50 GiB storage and 20 volumes; a team admin may set them within the team's grant on the cluster (ResourceExhausted beyond it), and a platform admin without limit. Returns AlreadyExists for a taken name. **Access:** a platform admin, or an admin of the `owner_team` team.