Cloud Functions API

Manages lightweight user-provided functions executed in response to events.

Service: cloudfunctions.googleapis.com

To call this service, we recommend that you use the Google-providedclient libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

Discovery document

ADiscovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:

Service endpoint

Aservice endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://cloudfunctions.googleapis.com

REST Resource:v2beta.projects.locations

Methods
listGET /v2beta/{name}/locations
Lists information about the supported locations for this service.

REST Resource:v2beta.projects.locations.functions

Methods
abortFunctionUpgradePOST /v2beta/{name}:abortFunctionUpgrade
Aborts generation upgrade process for a function with the given name from the specified project.
commitFunctionUpgradePOST /v2beta/{name}:commitFunctionUpgrade
Finalizes the upgrade after which function upgrade can not be rolled back.
createPOST /v2beta/{parent}/functions
Creates a new function.
deleteDELETE /v2beta/{name}
Deletes a function with the given name from the specified project.
detachFunctionPOST /v2beta/{name}:detachFunction
Detaches 2nd Gen function to Cloud Run function.
generateDownloadUrlPOST /v2beta/{name}:generateDownloadUrl
Returns a signed URL for downloading deployed function source code.
generateUploadUrlPOST /v2beta/{parent}/functions:generateUploadUrl
Returns a signed URL for uploading a function source code.
getGET /v2beta/{name}
Returns a function with the given name from the requested project.
getIamPolicyGET /v2beta/{resource}:getIamPolicy
Gets the access control policy for a resource.
listGET /v2beta/{parent}/functions
Returns a list of functions that belong to the requested project.
patchPATCH /v2beta/{function.name}
Updates existing function.
redirectFunctionUpgradeTrafficPOST /v2beta/{name}:redirectFunctionUpgradeTraffic
Changes the traffic target of a function from the original 1st Gen function to the 2nd Gen copy.
rollbackFunctionUpgradeTrafficPOST /v2beta/{name}:rollbackFunctionUpgradeTraffic
Reverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function.
setIamPolicyPOST /v2beta/{resource}:setIamPolicy
Sets the access control policy on the specified resource.
setupFunctionUpgradeConfigPOST /v2beta/{name}:setupFunctionUpgradeConfig
Creates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name.
testIamPermissionsPOST /v2beta/{resource}:testIamPermissions
Returns permissions that a caller has on the specified resource.

REST Resource:v2beta.projects.locations.operations

Methods
getGET /v2beta/{name}
Gets the latest state of a long-running operation.
listGET /v2beta/{name}/operations
Lists operations that match the specified filter in the request.

REST Resource:v2beta.projects.locations.runtimes

Methods
listGET /v2beta/{parent}/runtimes
Returns a list of runtimes that are supported for the requested project.

REST Resource:v2alpha.projects.locations

Methods
listGET /v2alpha/{name}/locations
Lists information about the supported locations for this service.

REST Resource:v2alpha.projects.locations.functions

Methods
abortFunctionUpgradePOST /v2alpha/{name}:abortFunctionUpgrade
Aborts generation upgrade process for a function with the given name from the specified project.
commitFunctionUpgradePOST /v2alpha/{name}:commitFunctionUpgrade
Finalizes the upgrade after which function upgrade can not be rolled back.
createPOST /v2alpha/{parent}/functions
Creates a new function.
deleteDELETE /v2alpha/{name}
Deletes a function with the given name from the specified project.
detachFunctionPOST /v2alpha/{name}:detachFunction
Detaches 2nd Gen function to Cloud Run function.
generateDownloadUrlPOST /v2alpha/{name}:generateDownloadUrl
Returns a signed URL for downloading deployed function source code.
generateUploadUrlPOST /v2alpha/{parent}/functions:generateUploadUrl
Returns a signed URL for uploading a function source code.
getGET /v2alpha/{name}
Returns a function with the given name from the requested project.
getIamPolicyGET /v2alpha/{resource}:getIamPolicy
Gets the access control policy for a resource.
listGET /v2alpha/{parent}/functions
Returns a list of functions that belong to the requested project.
patchPATCH /v2alpha/{function.name}
Updates existing function.
redirectFunctionUpgradeTrafficPOST /v2alpha/{name}:redirectFunctionUpgradeTraffic
Changes the traffic target of a function from the original 1st Gen function to the 2nd Gen copy.
rollbackFunctionUpgradeTrafficPOST /v2alpha/{name}:rollbackFunctionUpgradeTraffic
Reverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function.
setIamPolicyPOST /v2alpha/{resource}:setIamPolicy
Sets the access control policy on the specified resource.
setupFunctionUpgradeConfigPOST /v2alpha/{name}:setupFunctionUpgradeConfig
Creates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name.
testIamPermissionsPOST /v2alpha/{resource}:testIamPermissions
Returns permissions that a caller has on the specified resource.

REST Resource:v2alpha.projects.locations.operations

Methods
getGET /v2alpha/{name}
Gets the latest state of a long-running operation.
listGET /v2alpha/{name}/operations
Lists operations that match the specified filter in the request.

REST Resource:v2alpha.projects.locations.runtimes

Methods
listGET /v2alpha/{parent}/runtimes
Returns a list of runtimes that are supported for the requested project.

REST Resource:v2.projects.locations

Methods
listGET /v2/{name}/locations
Lists information about the supported locations for this service.

REST Resource:v2.projects.locations.functions

Methods
abortFunctionUpgradePOST /v2/{name}:abortFunctionUpgrade
Aborts generation upgrade process for a function with the given name from the specified project.
commitFunctionUpgradePOST /v2/{name}:commitFunctionUpgrade
Finalizes the upgrade after which function upgrade can not be rolled back.
createPOST /v2/{parent}/functions
Creates a new function.
deleteDELETE /v2/{name}
Deletes a function with the given name from the specified project.
detachFunctionPOST /v2/{name}:detachFunction
Detaches 2nd Gen function to Cloud Run function.
generateDownloadUrlPOST /v2/{name}:generateDownloadUrl
Returns a signed URL for downloading deployed function source code.
generateUploadUrlPOST /v2/{parent}/functions:generateUploadUrl
Returns a signed URL for uploading a function source code.
getGET /v2/{name}
Returns a function with the given name from the requested project.
getIamPolicyGET /v2/{resource}:getIamPolicy
Gets the access control policy for a resource.
listGET /v2/{parent}/functions
Returns a list of functions that belong to the requested project.
patchPATCH /v2/{function.name}
Updates existing function.
redirectFunctionUpgradeTrafficPOST /v2/{name}:redirectFunctionUpgradeTraffic
Changes the traffic target of a function from the original 1st Gen function to the 2nd Gen copy.
rollbackFunctionUpgradeTrafficPOST /v2/{name}:rollbackFunctionUpgradeTraffic
Reverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function.
setIamPolicyPOST /v2/{resource}:setIamPolicy
Sets the access control policy on the specified resource.
setupFunctionUpgradeConfigPOST /v2/{name}:setupFunctionUpgradeConfig
Creates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name.
testIamPermissionsPOST /v2/{resource}:testIamPermissions
Returns permissions that a caller has on the specified resource.

REST Resource:v2.projects.locations.operations

Methods
getGET /v2/{name}
Gets the latest state of a long-running operation.
listGET /v2/{name}/operations
Lists operations that match the specified filter in the request.

REST Resource:v2.projects.locations.runtimes

Methods
listGET /v2/{parent}/runtimes
Returns a list of runtimes that are supported for the requested project.

REST Resource:v1.operations

Methods
getGET /v1/{name}
Gets the latest state of a long-running operation.
listGET /v1/operations
Lists operations that match the specified filter in the request.

REST Resource:v1.projects.locations

Methods
listGET /v1/{name}/locations
Lists information about the supported locations for this service.

REST Resource:v1.projects.locations.functions

Methods
callPOST /v1/{name}:call
Synchronously invokes a deployed Cloud Function.
createPOST /v1/{location}/functions
Creates a new function.
deleteDELETE /v1/{name}
Deletes a function with the given name from the specified project.
generateDownloadUrlPOST /v1/{name}:generateDownloadUrl
Returns a signed URL for downloading deployed function source code.
generateUploadUrlPOST /v1/{parent}/functions:generateUploadUrl
Returns a signed URL for uploading a function source code.
getGET /v1/{name}
Returns a function with the given name from the requested project.
getIamPolicyGET /v1/{resource}:getIamPolicy
Gets the IAM access control policy for a function.
listGET /v1/{parent}/functions
Returns a list of functions that belong to the requested project.
patchPATCH /v1/{function.name}
Updates existing function.
setIamPolicyPOST /v1/{resource}:setIamPolicy
Sets the IAM access control policy on the specified function.
testIamPermissionsPOST /v1/{resource}:testIamPermissions
Tests the specified permissions against the IAM access control policy for a function.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-01 UTC.