Cloud Key Management Service (KMS) API
Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications.
Identity & security#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications.
Endpoints 47
projects.locations.singleTenantHsmInstances.proposals
- GETReturns metadata for a given SingleTenantHsmInstanceProposal.
/v1/:nameReturns metadata for a given SingleTenantHsmInstanceProposal. - DELETEDeletes a SingleTenantHsmInstanceProposal.
/v1/:nameDeletes a SingleTenantHsmInstanceProposal. - POSTApproves a SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance
/v1/:name:approveApproves a SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance. The proposal must be in the PENDING state. - GETLists SingleTenantHsmInstanceProposals.
/v1/:parent/proposals?filter=string&orderBy=string&pageSize=0&pageToken=string&showDeleted=trueLists SingleTenantHsmInstanceProposals. - POSTCreates a new SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance.
/v1/:parent/proposals?singleTenantHsmInstanceProposalId=stringCreates a new SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance. - POSTExecutes a SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance
/v1/:name:executeExecutes a SingleTenantHsmInstanceProposal for a given SingleTenantHsmInstance. The proposal must be in the APPROVED state.
projects.locations.keyRings.cryptoKeys.cryptoKeyVersions
- PATCHUpdate a CryptoKeyVersion's metadata
/v1/:name?updateMask=stringUpdate a CryptoKeyVersion's metadata. state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and… - POSTDecrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion…
/v1/:name:asymmetricDecryptDecrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT. - POSTSigns data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified…
/v1/:name:asymmetricSignSigns data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from… - GETLists CryptoKeyVersions.
/v1/:parent/cryptoKeyVersions?filter=string&orderBy=string&pageSize=0&pageToken=string&view=CRYPTO_KEY_VERSION_VIEW_UNSPECIFIEDLists CryptoKeyVersions. - POSTCreate a new CryptoKeyVersion in a CryptoKey
/v1/:parent/cryptoKeyVersionsCreate a new CryptoKeyVersion in a CryptoKey. The server will assign the next sequential id. If unset, state will be set to ENABLED. - POSTDecapsulates data that was encapsulated with a public key retrieved from GetPublicKey corresponding to a…
/v1/:name:decapsulateDecapsulates data that was encapsulated with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose… - POSTSchedule a CryptoKeyVersion for destruction
/v1/:name:destroySchedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will be set… - GETExports a CryptoKeyVersion with a trusted key
/v1/:name:exportTrustedKeyWrappedCryptoKeyVersion?wrappingKey=stringExports a CryptoKeyVersion with a trusted key. The CryptoKeyVersion must have trusted_wrapping_enabled set to true. The CryptoKeyVersion of the [wrapping_key]… - GETReturns the public key for the given CryptoKeyVersion
/v1/:name/publicKey?publicKeyFormat=PUBLIC_KEY_FORMAT_UNSPECIFIEDReturns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT. - POSTImport wrapped key material into a CryptoKeyVersion
/v1/:parent/cryptoKeyVersions:importImport wrapped key material into a CryptoKeyVersion. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request,… - POSTImport wrapped key material into a CryptoKeyVersion with a trusted key
/v1/:parent/cryptoKeyVersions:importTrustedKeyWrappedCryptoKeyVersionImport wrapped key material into a CryptoKeyVersion with a trusted key. All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified… - POSTSigns data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source…
/v1/:name:macSignSigns data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key. - POSTVerifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or…
/v1/:name:macVerifyVerifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful. - POSTDecrypts data that was originally encrypted using a raw cryptographic mechanism
/v1/:name:rawDecryptDecrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. - POSTEncrypts data using portable cryptographic primitives
/v1/:name:rawEncryptEncrypts data using portable cryptographic primitives. Most users should choose Encrypt and Decrypt rather than their raw counterparts. The CryptoKey.purpose… - POSTRestore a CryptoKeyVersion in the DESTROY_SCHEDULED state
/v1/:name:restoreRestore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be…
projects
- GETReturns the effective Cloud KMS Autokey configuration for a given project or folder
/v1/:parent:showEffectiveAutokeyConfigReturns the effective Cloud KMS Autokey configuration for a given project or folder. Note on permissions: - If called on a project (projects/{project}),… - GETReturns the KeyAccessJustificationsEnrollmentConfig of the resource closest to the given project in hierarchy.
/v1/:project:showEffectiveKeyAccessJustificationsEnrollmentConfigReturns the KeyAccessJustificationsEnrollmentConfig of the resource closest to the given project in hierarchy. - GETReturns the KeyAccessJustificationsPolicyConfig of the resource closest to the given project in hierarchy.
/v1/:project:showEffectiveKeyAccessJustificationsPolicyConfigReturns the KeyAccessJustificationsPolicyConfig of the resource closest to the given project in hierarchy.
projects.locations
- POSTGenerate random bytes using the Cloud KMS randomness source in the provided location.
/v1/:location:generateRandomBytesGenerate random bytes using the Cloud KMS randomness source in the provided location. - GETLists information about the supported locations for this service
/v1/:name/locations?extraLocationTypes=string&filter=string&pageSize=0&pageToken=stringLists information about the supported locations for this service. This method lists locations based on the resource scope provided in the…
projects.locations.keyRings.importJobs
- GETGets the access control policy for a resource
/v1/:resource:getIamPolicy?options.requestedPolicyVersion=0Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. - POSTSets the access control policy on the specified resource
/v1/:resource:setIamPolicySets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. - POSTReturns permissions that a caller has on the specified resource
/v1/:resource:testIamPermissionsReturns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND… - GETLists ImportJobs.
/v1/:parent/importJobs?filter=string&orderBy=string&pageSize=0&pageToken=stringLists ImportJobs. - POSTCreate a new ImportJob within a KeyRing
/v1/:parent/importJobs?importJobId=stringCreate a new ImportJob within a KeyRing. ImportJob.import_method is required.
projects.locations.ekmConnections
- GETLists EkmConnections.
/v1/:parent/ekmConnections?filter=string&orderBy=string&pageSize=0&pageToken=stringLists EkmConnections. - POSTCreates a new EkmConnection in a given Project and Location.
/v1/:parent/ekmConnections?ekmConnectionId=stringCreates a new EkmConnection in a given Project and Location. - GETVerifies that Cloud KMS can successfully connect to the external key manager specified by an EkmConnection
/v1/:name:verifyConnectivityVerifies that Cloud KMS can successfully connect to the external key manager specified by an EkmConnection. If there is an error connecting to the EKM, this…
projects.locations.keyHandles
- GETLists KeyHandles.
/v1/:parent/keyHandles?filter=string&pageSize=0&pageToken=stringLists KeyHandles. - POSTCreates a new KeyHandle, triggering the provisioning of a new CryptoKey for CMEK use with the given resource type in…
/v1/:parent/keyHandles?keyHandleId=stringCreates a new KeyHandle, triggering the provisioning of a new CryptoKey for CMEK use with the given resource type in the configured key project and the same…
projects.locations.keyRings
- GETLists KeyRings.
/v1/:parent/keyRings?filter=string&orderBy=string&pageSize=0&pageToken=stringLists KeyRings. - POSTCreate a new KeyRing in a given Project and Location.
/v1/:parent/keyRings?keyRingId=stringCreate a new KeyRing in a given Project and Location.
projects.locations.keyRings.cryptoKeys
- GETLists CryptoKeys.
/v1/:parent/cryptoKeys?filter=string&orderBy=string&pageSize=0&pageToken=string&versionView=CRYPTO_KEY_VERSION_VIEW_UNSPECIFIEDLists CryptoKeys. - POSTCreate a new CryptoKey within a KeyRing
/v1/:parent/cryptoKeys?cryptoKeyId=string&skipInitialVersionCreation=true&trustedWrappingEnabled=trueCreate a new CryptoKey within a KeyRing. CryptoKey.purpose and CryptoKey.version_template.algorithm are required. - POSTDecrypts data that was protected by Encrypt
/v1/:name:decryptDecrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT. - POSTEncrypts data, so that it can only be recovered by a call to Decrypt
/v1/:name:encryptEncrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT. - POSTUpdate the version of a CryptoKey that will be used in Encrypt
/v1/:name:updatePrimaryVersionUpdate the version of a CryptoKey that will be used in Encrypt. Returns an error if called on a key whose purpose is not ENCRYPT_DECRYPT.
projects.locations.retiredResources
- GETLists the RetiredResources which are the records of deleted CryptoKeys
/v1/:parent/retiredResources?pageSize=0&pageToken=stringLists the RetiredResources which are the records of deleted CryptoKeys. RetiredResources prevent the reuse of these resource names after deletion.
projects.locations.singleTenantHsmInstances
- GETLists SingleTenantHsmInstances.
/v1/:parent/singleTenantHsmInstances?filter=string&orderBy=string&pageSize=0&pageToken=string&showDeleted=trueLists SingleTenantHsmInstances. - POSTCreates a new SingleTenantHsmInstance in a given Project and Location
/v1/:parent/singleTenantHsmInstances?singleTenantHsmInstanceId=stringCreates a new SingleTenantHsmInstance in a given Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this single-tenant HSM…
API details
- Base URL
https://cloudkms.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow) with 2 scopes
An API key in the key query parameter - Operations
- 47 operations on 37 pathsPOST 27GET 18PATCH 1DELETE 1
- Main resources
- projects.locations.keyRings.cryptoKeys.cryptoKeyVersions 16projects.locations.singleTenantHsmInstances.proposals 6projects.locations.keyRings.cryptoKeys 5projects.locations.keyRings.importJobs 5projects 3projects.locations.ekmConnections 3projects.locations 2projects.locations.keyHandles 2projects.locations.keyRings 2projects.locations.singleTenantHsmInstances 2
- Response formats
application/json- Description format
- Google API Discovery, API version
v1 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Cloud Key Management Service (KMS) API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Cloud Key Management Service (KMS) API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 2 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Returns metadata for a given SingleTenantHsmInstanceProposal.” (GET /v1/:name), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Cloud Key Management Service (KMS) API?
Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications. It is listed under Identity & security and has 47 endpoints.
Who publishes the Cloud Key Management Service (KMS) API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Cloud Key Management Service (KMS) API?
Requests go to https://cloudkms.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Cloud Key Management Service (KMS) API?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 2 scopes; an API key in the key query parameter.
How many endpoints does the Cloud Key Management Service (KMS) API have?
47 operations on 37 paths (27 POST, 18 GET, 1 PATCH, 1 DELETE). The largest groups are projects.locations.keyRings.cryptoKeys.cryptoKeyVersions, projects.locations.singleTenantHsmInstances.proposals, projects.locations.keyRings.cryptoKeys, projects.locations.keyRings.importJobs.
Is forking the Cloud Key Management Service (KMS) API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.