API keys
The organization's API keys. revoke revokes a key for good (only a revoked key can be removed with delete), and rotate issues a successor and keeps the previous one working for a few days — the new secret shows up once, in the response.
| Command | HTTP | Description |
|---|---|---|
api-keys list | GET /v1/api_keys | List API keys |
api-keys create | POST /v1/api_keys | Create API key |
api-keys get | GET /v1/api_keys/{id} | Get API key |
api-keys update | PATCH /v1/api_keys/{id} | Update API key |
api-keys delete | DELETE /v1/api_keys/{id} | Remove revoked API key |
api-keys revoke | POST /v1/api_keys/{id}/revoke | Revoke API key |
api-keys rotate | POST /v1/api_keys/{id}/rotate | Rotate API key |
Examples
--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List API keys
kobana dashboards api-keys list \
--params '{"status": "active"}' \
--fields "id,name,prefix,status,expires_at"
# Create API key
kobana dashboards api-keys create \
--json '{"name": "Integração ERP", "expires_at": "2027-10-01T00:00:00Z"}'
# Rotate API key
kobana dashboards api-keys rotate \
--params '{"id": "API_KEY_ID"}' \
--json '{"grace_days": 7}'
# Revoke API key
kobana dashboards api-keys revoke --params '{"id": "API_KEY_ID"}' --dry-run
Next steps
- Token identity
- Schema introspection — every parameter this resource accepts.