API REFERENCE

Permission Scopes

API key permission scopes that control read access to Kubeadapt endpoints. Covers clusters, workloads, nodes, costs, and recommendations scopes.

Each API key is granted one or more permission scopes when created. A request to an endpoint that requires a scope your key doesn't have returns 403 Forbidden.

Scopes

ScopeEndpoints
clusters:readGET /v1/clusters, GET /v1/clusters/{id}, GET /v1/clusters/{id}/dashboard, GET /v1/clusters/{id}/cost-distribution
workloads:readGET /v1/workloads, GET /v1/workloads/{uid}/metrics, GET /v1/workloads/{uid}/nodes
nodes:readGET /v1/nodes, GET /v1/nodes/{uid}/metrics
namespaces:readGET /v1/namespaces, GET /v1/namespaces/{name}/details, GET /v1/namespaces/{name}/trends
node_groups:readGET /v1/node-groups, GET /v1/node-groups/{name}/details
persistent_volumes:readGET /v1/persistent-volumes
costs:teams:readGET /v1/costs/teams
costs:departments:readGET /v1/costs/departments
recommendations:readGET /v1/recommendations
overview:readGET /v1/overview, GET /v1/dashboard

Assigning Scopes

Scopes are assigned when you create an API key in the Kubeadapt dashboard. You can't modify scopes after creation. If you need different permissions, create a new key with the required scopes.

Grant only the scopes your integration needs. A key used only for cost reporting doesn't need workloads:read or nodes:read.

Scope Errors

When a request fails due to missing scope, the response is:

json
{ "detail": "Missing required permission: clusters:read" }

The error message includes the specific scope that was missing. Check the endpoint's required scope in the table above and verify your key has it.