The
apikeys client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.Create issues user keys; CreateServiceKey issues service keys.
List API Keys
List returns a paginated list of API keys. Defaults to a page size of 50.
Signature:
Create a User API Key
Create issues a POST to create a new user API key and returns the created key, including the secret token. The secret is only returned at creation time.
Signature:
Create a Service API Key
CreateServiceKey creates a new service API key bound to a space. Space accepts a space name or ID. The role fields are optional — when empty, the server applies its default role at each scope.
Signature:
Refresh an API Key
Refresh rotates the secret on an existing API key and returns the new key value. ExpiresAt is optional; when zero, the refreshed key has no expiration.
Signature:
Revoke an API Key
Revoke sets an API key’s status to revoked by ID. The key stops working immediately; revoking an already-revoked key is a no-op and still succeeds.
Signature: