List API tokens
auth.api_keys.list(APIKeyListParams**kwargs) -> APIKeyListResponse
GET/api/auth/api-keys/
List metadata for API tokens you created (secrets are never returned).
Parameters
ordering: Optional[str]
Which field to use when ordering the results.
page: Optional[int]
A page number within the paginated result set.
search: Optional[str]
A search term.
Returns
List API tokens
from overmind_lab import OvermindLab
client = OvermindLab()
api_keys = client.auth.api_keys.list()
print(api_keys.count){
"count": 123,
"results": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"prefix": "prefix",
"project": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"expires_at": "2019-12-27T18:11:19.117Z",
"is_active": true,
"last_used_at": "2019-12-27T18:11:19.117Z",
"name": "name"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Returns Examples
{
"count": 123,
"results": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"prefix": "prefix",
"project": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"expires_at": "2019-12-27T18:11:19.117Z",
"is_active": true,
"last_used_at": "2019-12-27T18:11:19.117Z",
"name": "name"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}