Skip to main content
List API keys visible to the authenticated key. Key secret values are not returned. Required scope: admin
keys = await mesa.api_keys.list(limit=50)

for key in keys.api_keys:
    print(key.id, key.name, key.scopes)

Options

org
str | None
Organization override.
cursor
str | None
Opaque pagination cursor from a previous response.
limit
int | None
Maximum number of items to return. The server maximum is 100.

Response

next_cursor
str | None
Cursor for the next page, or null when no more results remain.
has_more
bool
Whether another page of results is available.
api_keys
list[ApiKeyListItem]
API key summaries.

ApiKeyListItem

id
str
API key ID.
name
str | None
API key name, or null when unnamed.
scopes
list[str]
Scopes granted to this key.
repo_ids
list[str] | None
Repository allowlist, or null when the key is not repo-scoped.
metadata
dict[str, object] | None
Additional API key metadata, or null when absent.
tags
dict[str, str]
User-defined API key tags.
last_used_at
datetime | None
Last use time, or null when the key has not been used.
expires_at
datetime | None
Expiration time, or null when the key does not expire.
revoked_at
datetime | None
Revocation time, or null when the key is active.
created_at
datetime
Creation time.