client.users.list_api_keys
A method of the Users endpoint.
- list_api_keys(id: str, *, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse
Show API keys belonging to the specified user
API URL:
GET /users/{id}/api_keysimport civis client = civis.APIClient() response = client.users.list_api_keys(...)
- Parameters:
- idstr
The ID of the user or ‘me’.
- limitint, optional
Number of results to return. Defaults to its maximum of 50.
- page_numint, optional
Page number of the results to return. Defaults to the first page, 1.
- orderstr, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dirstr, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iteratorbool, optional
If True, return a generator (specifically, a
civis.PaginatedResponseobject) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.PaginatedResponse- idint
The ID of the API key.
- namestr
The name of the API key.
- expires_atstr (date-time)
The date and time when the key expired.
- created_atstr (date-time)
The date and time when the key was created.
- revoked_atstr (date-time)
The date and time when the key was revoked.
- last_used_atstr (date-time)
The date and time when the key was last used.
- scopesList[str]
The scopes which the key is permissioned on.
- use_countint
The number of times the key has been used.
- expiredbool
True if the key has expired.
- activebool
True if the key has neither expired nor been revoked.
- constraint_countint
The number of constraints on the created key