Skip to Content
Xeonr Developer Docs
API SpecificationNamespaces

Grant Managed Product

POST
/containers.api.v1.NamespaceService/GrantManagedProduct

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.

Authorization

BearerAuth
AuthorizationBearer <token>

A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC token for humans. The key's namespace and role are pinned server-side.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

namespace?string
Length1 <= length <= 64
product?string
Length1 <= length <= 64
role?not unknown

ROLE_OPERATOR or ROLE_VIEWER; UNSPECIFIED means OPERATOR. enum.defined_only = true

Value in"ROLE_UNSPECIFIED" | "ROLE_VIEWER" | "ROLE_OPERATOR" | "ROLE_ADMIN"
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://containers.xeonr.io/containers.api.v1.NamespaceService/GrantManagedProduct" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "grant": {
    "namespace": "string",
    "product": "string",
    "role": "ROLE_UNSPECIFIED",
    "ownerTeam": "string",
    "lapsed": true,
    "source": "SOURCE_UNSPECIFIED",
    "grantedBy": "string",
    "grantedAtUnix": "string",
    "updatedAtUnix": "string"
  }
}