Method: projects.locations.functions.call

Invokes synchronously deployed function. To be used for testing, very limited traffic allowed.

HTTP request

POST https://cloudfunctions.googleapis.com/v1/{name}:call

Path parameters

Parameters
name

string

The name of the function to be called. It takes the form projects/{project_id}/locations/{location_id}/functions/{function_id}.

Authorization requires the following Google IAM permission on the specified resource name:

  • cloudfunctions.functions.call

Request body

The request body contains data with the following structure:

JSON representation
{
  "data": string,
}
Fields
data

string

Input to be passed to the function.

Response body

If successful, the response body contains data with the following structure:

Response of functions.call method.

JSON representation
{
  "executionId": string,
  "result": string,
  "error": string,
}
Fields
executionId

string

Execution id of function invocation.

result

string

Result populated for successful execution of synchronous function. Will not be populated if function does not return a result through context.

error

string

Either system or user-function generated error. Set if execution was not successful.

Authorization

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

Try it!

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Functions