Method: projects.locations.collections.dataConnector.executeAction

Executes a 3rd party action using the DataConnector.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:executeAction

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. DataConnector resource.

The data connector used for executing the action.

Request body

The request body contains data with the following structure:

JSON representation
{
  "actionName": string,
  "args": {
    object
  },
  "languageCode": string,
  "assistAnswerInfo": {
    object (AssistAnswerInfo)
  }
}
Fields
actionName

string

Required. Name of the action.

For example: "send_email"

args

object (Struct format)

Required. Named arguments of the action.

For example: {"recipient": "tom@...", "subject": ... }

When offered to a user, this part might be editable.

languageCode

string

Optional. Language to be used for status and error messages created by actions.

assistAnswerInfo

object (AssistAnswerInfo)

Optional. If specified, the result of the action execution will be associated with the given assist answer. This lets the assistant take the result into account in subsequent answers in the same session.

The referenced assist answer resource must exist.

Response body

Response for the DataConnectorService.ExecuteAction method.

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

JSON representation
{
  "status": {
    object (Status)
  },
  "textResult": string,
  "result": {
    object
  }
}
Fields
status

object (Status)

Status of the action execution.

textResult

string

Human readable result of the action execution in case of success.

result

object (Struct format)

Detailed result of the action execution in case of success.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

AssistAnswerInfo

Message that identifes an action invocation in the assist answer.

JSON representation
{
  "assistAnswer": string,
  "invocationId": string
}
Fields
assistAnswer

string

Required. Name of the assist answer.

Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assistAnswer}

invocationId

string

Required. The action invocation ID.