Skip to main content

kobana dashboards api-keys

Commands of kobana dashboards api-keys. Every global option (Global options) applies here.

CommandHTTPDescription
api-keys listGET /v1/api_keysList API keys
api-keys createPOST /v1/api_keysCreate API key
api-keys getGET /v1/api_keys/{id}Get API key
api-keys updatePATCH /v1/api_keys/{id}Update API key
api-keys deleteDELETE /v1/api_keys/{id}Remove revoked API key
api-keys revokePOST /v1/api_keys/{id}/revokeRevoke API key
api-keys rotatePOST /v1/api_keys/{id}/rotateRotate API key

api-keys list​

List API keys

kobana dashboards api-keys list [OPTIONS]

GET /v1/api_keys

Lists the organization API keys (kb_…), without the secret. These keys no longer authenticate the API v1 nor the MCP — both take access tokens issued by the Kobana authorization server; the records remain the organization key inventory (lifecycle, expiry reminders and api_key.* webhooks). Organization-level: ignores X-Workspace-Id.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
statusstringnoFilter by status: active, disabled or revoked. Values: active, disabled, revoked.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Page of API keys.
404Resource not found in the current organization.

api-keys create​

Create API key

kobana dashboards api-keys create [OPTIONS]

POST /v1/api_keys

Creates an active key, valid for one year unless expires_at says otherwise. The secret (key) is returned ONCE in this response — only its hash is stored. Requires a person who reaches every workspace (organization owner or granted on each one), as in the dashboard.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringyesKey name (required).
descriptionstringno
sourcestringnoWhere the key will be used. Default dashboard. Values: api, dashboard, manage.
notification_emailsarray<string>noE-mails that get the expiry reminders.
expires_atstring (date-time)noExpiry (ISO 8601 date-time in the future). Default: one year from now.

More fields and nested objects: kobana schema dashboards.api-keys.create.

Responses

HTTPDescription
201Key created, with the secret in key (shown only now).
400Missing body, invalid JSON or incompatible fields.
404Resource not found in the current organization.
422Request body failed validation.

api-keys get​

Get API key

kobana dashboards api-keys get [ID] [OPTIONS]

GET /v1/api_keys/{id}

Returns one organization key — metadata and lifecycle stamps, never the secret.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The API key.
404Resource not found in the current organization.

api-keys update​

Update API key

kobana dashboards api-keys update [ID] [OPTIONS]

PATCH /v1/api_keys/{id}

Edits name, description, source, notification e-mails and expiry, and/or enables ⇄ disables the key with enabled. A revoked key is terminal (409).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringno
descriptionstringno
sourcestringnoValues: api, dashboard, manage.
notification_emailsarray<string>noE-mails that get the expiry reminders.
expires_atstring (date-time)noNew expiry (ISO 8601); null removes the expiry.
enabledbooleannofalse disables the key; true re-enables it.

More fields and nested objects: kobana schema dashboards.api-keys.update.

Responses

HTTPDescription
200The API key.
400Missing body, invalid JSON or incompatible fields.
404Resource not found in the current organization.
409The current state of the resource does not allow this operation.
422Request body failed validation.

api-keys delete​

Remove revoked API key

kobana dashboards api-keys delete [ID] [OPTIONS]

DELETE /v1/api_keys/{id}

Removes an ALREADY REVOKED key from the list (soft delete; history is kept). An active or disabled key must be revoked first (409).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Removed.
404Resource not found in the current organization.
409The current state of the resource does not allow this operation.

api-keys revoke​

Revoke API key

kobana dashboards api-keys revoke [ID] [OPTIONS]

POST /v1/api_keys/{id}/revoke

Permanently revokes the key — it cannot be re-enabled. 409 when it is already revoked.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The API key.
404Resource not found in the current organization.
409The current state of the resource does not allow this operation.

api-keys rotate​

Rotate API key

kobana dashboards api-keys rotate [ID] [OPTIONS]

POST /v1/api_keys/{id}/rotate

Issues a successor key (same name and settings) and keeps the previous one working for grace_days days (default 7, max 30). Only an active key rotates (409). The new secret is returned ONCE.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
grace_daysintegernoDays the previous key keeps working (0 to 30, default 7).

More fields and nested objects: kobana schema dashboards.api-keys.rotate.

Responses

HTTPDescription
200The successor key with its secret in key, and previous_key with the grace period of the old one.
404Resource not found in the current organization.
409The current state of the resource does not allow this operation.
422Request body failed validation.