Users
Update an API key
- INVALID_ARGUMENT when the mask names a field that can't be updated.
- FAILED_PRECONDITION when the key is revoked.
- ABORTED when
etagis set and the key changed since it was read.
Scope: apikey:write
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.
The apiKey id.
Query Parameters
The fields to update: display_name and scopes.
Request Body
application/json
The key with updated fields. Its resource_name identifies the key, and only the
fields named in update_mask are applied. Its etag, when set, must
match the key's current one.
TypeScript Definitions
Use the request body type in TypeScript.
The key with updated fields. Its resource_name identifies the key, and only the
fields named in update_mask are applied. Its etag, when set, must
match the key's current one.
Response Body
application/json
curl -X PATCH "https://example.com/v1/users/string/apiKeys/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "api_key": { "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" }}Revoke an API key POST
- NOT_FOUND when the caller has no key with that resource name. Scope: `apikey:write`
Retrieve a user GET
- NOT_FOUND when no member of the caller's organization has that resource name. - PERMISSION_DENIED for `users/me` when the caller is not a person, such as a service account, and for another member without `user:read`. Scope: none for `users/me`, `user:read` for anyone else.