Google

Cloud Functions API

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

Developer tools#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 lightweight user-provided functions executed in response to events.

Endpoints 20

projects.locations

  • GETLists information about the supported locations for this service/v2/: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.functions

  • POSTAborts generation upgrade process for a function with the given name from the specified project/v2/:name:abortFunctionUpgradeAborts generation upgrade process for a function with the given name from the specified project. Deletes all 2nd Gen copy related configuration and resources…
  • POSTFinalizes the upgrade after which function upgrade can not be rolled back/v2/:name:commitFunctionUpgradeFinalizes the upgrade after which function upgrade can not be rolled back. This is the last step of the multi step process to upgrade 1st Gen functions to 2nd…
  • POSTCommits a function upgrade from GCF Gen1 to GCF Gen2/v2/:name:commitFunctionUpgradeAsGen2Commits a function upgrade from GCF Gen1 to GCF Gen2. This action deletes the Gen1 function, leaving the Gen2 function active and manageable by the GCFv2 API.
  • GETReturns a list of functions that belong to the requested project./v2/:parent/functions?filter=string&orderBy=string&pageSize=0&pageToken=stringReturns a list of functions that belong to the requested project.
  • POSTCreates a new function/v2/:parent/functions?functionId=stringCreates a new function. If a function with the given name already exists in the specified project, the long running operation will return ALREADY_EXISTS error.
  • DELETEDeletes a function with the given name from the specified project/v2/:nameDeletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this…
  • PATCHUpdates existing function./v2/:name?updateMask=stringUpdates existing function.
  • POSTDetaches 2nd Gen function to Cloud Run function./v2/:name:detachFunctionDetaches 2nd Gen function to Cloud Run function.
  • POSTReturns a signed URL for downloading deployed function source code/v2/:name:generateDownloadUrlReturns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of…
  • POSTReturns a signed URL for uploading a function source code/v2/:parent/functions:generateUploadUrlReturns a signed URL for uploading a function source code. For more information about the signed URL usage see:…
  • GETGets the access control policy for a resource/v2/: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.
  • POSTChanges the traffic target of a function from the original 1st Gen function to the 2nd Gen copy/v2/:name:redirectFunctionUpgradeTrafficChanges the traffic target of a function from the original 1st Gen function to the 2nd Gen copy. This is the second step of the multi step process to upgrade…
  • POSTReverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function/v2/:name:rollbackFunctionUpgradeTrafficReverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function. After this operation, all new traffic would be served by the…
  • POSTSets the access control policy on the specified resource/v2/:resource:setIamPolicySets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
  • POSTCreates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name/v2/:name:setupFunctionUpgradeConfigCreates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name. This is the first step of the multi step process to…
  • POSTReturns permissions that a caller has on the specified resource/v2/: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…

projects.locations.operations

  • GETGets the latest state of a long-running operation/v2/:nameGets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
  • GETLists operations that match the specified filter in the request/v2/:name/operations?filter=string&pageSize=0&pageToken=string&returnPartialSuccess=trueLists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

projects.locations.runtimes

  • GETReturns a list of runtimes that are supported for the requested project./v2/:parent/runtimes?filter=stringReturns a list of runtimes that are supported for the requested project.

API details

Base URL
https://cloudfunctions.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 1 scope
An API key in the key query parameter
Operations
20 operations on 17 pathsPOST 12GET 6PATCH 1DELETE 1
Main resources
projects.locations.functions 16projects.locations.operations 2projects.locations 1projects.locations.runtimes 1
Response formats
application/json
Description format
Google API Discovery, API version v2

How to test the Cloud Functions API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Cloud Functions API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 1 scope. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Lists information about the supported locations for this service” (GET /v2/:name/locations?extraLocationTypes=string&filter=string&pageSize=0&pageToken=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Cloud Functions API?

Manages lightweight user-provided functions executed in response to events. It is listed under Developer tools and has 20 endpoints.

Who publishes the Cloud Functions 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 Functions API?

Requests go to https://cloudfunctions.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Cloud Functions API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 1 scope; an API key in the key query parameter.

How many endpoints does the Cloud Functions API have?

20 operations on 17 paths (12 POST, 6 GET, 1 PATCH, 1 DELETE). The largest groups are projects.locations.functions, projects.locations.operations, projects.locations, projects.locations.runtimes.

Is forking the Cloud Functions API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.