Invoke Service Function

Invoke a Google Cloud Run Service function using an HTTP request.

The Invoke Service Function card can only invoke 1st gen Google Cloud Run Service functions. It can't invoke 1st or 2nd gen Google Cloud Functions.

There are several ways to create Google Cloud Run Service functions, including the following:

  • Google Cloud Run Service UI.

  • Google Cloud Run Service UI console.

  • Google Cloud Run SDK.

  • Google Cloud Run API.

  • Google CLI.

  • Terraform.

Refer to the following:

Options

Field Definition Type Required

Region

Choose the assigned region for your project.

The names of the cloud functions in each region are unique, but you can have the same named function in two different regions.

The default option is us-central1.

Dropdown TRUE

Function Name

Name of the function.

Dropdown TRUE

Request Type

One of five supported HTTP request methods in custom API calls:

  • GET retrieves data from a web server based on your parameters. GET requests ask for a representation of the specified resource. If successful, a GET request returns a 200 OK response message with the requested content.
  • POST sends data to a web server based on your parameters. POST requests include actions like uploading a file. Multiple POST requests may result in a different outcome than a single POST, so you should be cautious about unintentionally sending multiple requests. A successful POST request returns a 200 OK response message.
  • PUT sends data to a location in the web server based on your parameters. PUT requests include actions like uploading a file. The difference between a PUT and a POST request is that PUT is idempotent. This means that the result of a single successful PUT is the same as many identical PUT requests. A successful PUT request returns a 2xx response message (usually 201 or 204).
  • PATCH applies partial modifications to a resource on a web server based on your parameters. A PATCH request isn't idempotent, meaning that multiple PATCH requests could have unintended consequences. A successful PATCH request returns a 2xx response message (usually 204).
  • DELETE deletes the specified resource from the web server based on your parameters, if the resource exists. A successful DELETE request returns a 200 OK response message.
Dropdown TRUE

Input

Field Definition Type Required

Query

JSON object that determines the action taken at the URL.

For example: {"name":"something-urgent"}

Object or Text

FALSE

Headers

JSON object that determines the content type of the request.

For example: {"Content-type":"application/json"}

Object FALSE

Body

JSON object that is passed in the content of the request.

For example: {"id":10}

Object FALSE

Output

Field Definition Type

Status Code

Result of the operation. The connector returns an HTTP status code that indicates whether the action taken by the card succeeded or failed. For example:

  • A 201 Created status code indicates success where a new resource was created.
  • A 403 Forbidden error indicates that the HTTP request wasn't processed because the necessary permissions were missing.

For a full list of possible status codes, see HTTP status codes.

Number

Headers

A detailed context for the status code, unrelated to the output body.

Response headers depend on your selected HTTP request option. Not all headers are response headers.

Object

Body

Data returned from your selected HTTP request, for example, the data from a GET request.

Object