Users
List API keys
- PERMISSION_DENIED when
parentis not the caller.
Scope: apikey:read
Authorization
bearerAuth An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...
In: header
Path Parameters
The user id.
Query Parameters
Maximum number of keys to return per page. Defaults to 50 when omitted or 0; must not exceed 100.
int320 <= value <= 100Opaque pagination token from a previous response.
An AIP-160 filter expression. Filterable fields are resource_name,
name and status (ACTIVE or REVOKED). resource_name takes the
full resource name, with - for the parent, and name the short name,
as in name = "ci-deploy".
Example: status = ACTIVE
id is filterable too: id = "a" OR id = "b" reads up to 100 of
them by id in one call.
length <= 4096Fields to order by, in AIP-132 syntax such as created_at desc. Accepted
fields: created_at, name, updated_at. Left empty, the list keeps the
order stated above. An unknown field is INVALID_ARGUMENT.
length <= 256Response Body
application/json
curl -X GET "https://example.com/v1/users/string/apiKeys"{ "api_keys": [ { "id": "string", "name": "string", "display_name": "string", "resource_name": "string", "owner_id": "string", "scopes": [ "string" ], "expires_at": "2023-01-15T01:30:15.01Z", "status": "API_KEY_STATUS_UNSPECIFIED", "last_used_at": "2023-01-15T01:30:15.01Z", "revoked_at": "2023-01-15T01:30:15.01Z", "etag": "string", "created_by": { "id": "string", "display_name": "string", "email": "string" }, "created_at": "2023-01-15T01:30:15.01Z", "updated_at": "2023-01-15T01:30:15.01Z" } ], "next_page_token": "string"}Retrieve an API key GET
- NOT_FOUND when the caller has no key with that resource name. - PERMISSION_DENIED when the resource name's user is not the caller. Scope: `apikey:read`
Rename an API key POST
- ALREADY_EXISTS when another of the caller's active, unexpired keys has the new name. - ABORTED when `etag` is set and the key changed since it was read. Scope: `apikey:write`