Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is global.
Request
- Base URLhttps://apikeys.googleapis.com
- URLhttps://apikeys.googleapis.com/v2/{+parent}/keys
- Auth
- OAuth 2 and OAuth 2Implicit: https://accounts.google.com/o/oauth2/authScopes: https://www.googleapis.com/auth/apikeysAuthorization code: https://accounts.google.com/o/oauth2/authToken URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/apikeys
- or OAuth 2 and OAuth 2Implicit: https://accounts.google.com/o/oauth2/authScopes: https://www.googleapis.com/auth/cloud-platformAuthorization code: https://accounts.google.com/o/oauth2/authToken URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform
Path parameters
Required. The project in which the API key is created. The parent field must be in format of "projects//locations/global".
Query parameters
User specified key id (optional). If specified, it will become the final component of the key resource name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the id must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. The id must NOT be a UUID-like string.
Request body
Response
Successful response
Changes
- breaking
removed the request body
- breaking
removed the media type
*/*for the response with the status - info
the security scope
https://www.googleapis.com/auth/apikeyswas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/apikeyswas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas removed from the endpoint's security schemeOauth2c
- breaking
- info
the security scope
https://www.googleapis.com/auth/apikeyswas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/apikeyswas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas removed from the endpoint's security schemeOauth2c
- info