Skip to content

How-to Guides

Mint an API key

Create a Kubeadapt API key from the dashboard with the right scopes for one integration.

Last updated


Every integration that calls the Kubeadapt REST API needs its own key. This guide walks the dashboard flow, the scope decision, and the one-time-secret handling rules.


1. Open the API keys page

Go to app.kubeadapt.io → Developers → API keys → Create API key.

The dialog has three inputs: a Name, a Scopes picker and the Clusters the key may read.


2. Name the key

Use the integration name, not a person's name: grafana-export, finance-chargeback, ci-cost-check. Descriptive names make later audits and revocations far easier.

The field accepts up to 255 characters and is required.


3. Pick the minimum scopes

The dashboard lists every *:read scope as a toggleable pill, grouped by category. Tick only what the integration actually calls — at least one scope is required to enable Create key. Read-only access is enforced server-side.

Available scopes:

CategoryScopeUnlocks
Organizationorganization:readTenant metadata
Clustersclusters:readCluster inventory
Workloadsnamespaces:readNamespace listing
Workloadsworkloads:readDeployments, StatefulSets, DaemonSets, Jobs
Infrastructurenodes:readNode inventory and capacity
Recommendationsrecommendations:readRight-sizing and savings suggestions
Attributionteams:readTeam allocations
Attributiondepartments:readDepartment allocations
Attributioncost_explorer:readCost Explorer queries

Common minimum sets:

IntegrationScopes
Read-only Grafana / BI exporterorganization:read, clusters:read, namespaces:read, workloads:read, nodes:read
Finance chargeback pipelineteams:read, departments:read, organization:read
SRE savings dashboardrecommendations:read, clusters:read, nodes:read
Cost Explorer query proxycost_explorer:read

Adding scopes later means minting a second key — the dashboard does not edit existing keys.

See Permission Scopes for the full endpoint-to-scope mapping.


4. Cluster visibility

An admin can choose All clusters: the key sees every cluster in the tenant, including clusters added after the key was minted. Choose Selected clusters to limit the key to the ones you tick; a cluster added later stays out of reach. Anyone who is not an admin always picks from the clusters they can see.

The key list under Developers → API keys shows which clusters each key reaches.


5. Copy the key immediately

The full key is shown once. Copy it into a password manager or your secrets store before navigating away.


6. Verify the key

Run a 200 OK smoke test before deploying the key to production:

bash
curl -H "Authorization: Bearer ka_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  "https://public-api.kubeadapt.io/v1/organization"

A 401 UNAUTHORIZED means the header is wrong or the key was not accepted. A 403 FORBIDDEN means the key works but is missing the organization:read scope — mint a new key with the right scopes (existing keys cannot be edited).

See Authentication for the full 401 vs 403 contract.


See also