- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.BuildActionInvocationResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#body.aspect_1)
- [ActionInvocation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#ActionInvocation)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#ActionInvocation.SCHEMA_REPRESENTATION)

Builds an action invocation using the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections#DataConnector`.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:buildActionInvocation`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections#DataConnector` resource. The data connector used for building the action invocation. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "actionName": string, "languageCode": string } ``` |

| Fields ||
|---|---|
| `actionName` | `string` Required. name of the action. For example: `"send_email"` |
| `languageCode` | `string` Optional. Language to be used for status and error messages. |

### Response body

Response for the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#google.cloud.discoveryengine.v1alpha.DataConnectorService.BuildActionInvocation` method.

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

| JSON representation |
|---|
| ``` { "actionInvocation": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#ActionInvocation`) } } ``` |

| Fields ||
|---|---|
| `actionInvocation` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataConnector/buildActionInvocation#ActionInvocation`)`` The action invocation. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.assist.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `discoveryengine.dataConnectors.buildActionInvocation`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## ActionInvocation

Represents an action invocation.

| JSON representation |
|---|
| ``` { "agentName": string, "actionName": string, "args": { object }, "dataConnector": string, "dataSource": string, "invocationId": string, "actionDisplayName": string, "userConfirmationMessage": string, "authorizationUrl": string, "resendQueryOnUserAuthorization": boolean, "parameterDeclaration": { object }, "argSetCandidates": [ { object } ], "executedArgs": { object } } ``` |

| Fields ||
|---|---|
| `agentName` | `string` Optional. name of the agent that is performing the action. |
| `actionName` | `string` name of the action. For example: "send_email" |
| `args` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Named arguments of the action. For example: `{"recipient": "tom@...", "subject": ... }` When offered to a user, this part might be editable. If there are multiple options for the action arguments (e.g., multiple possible time slots for a calendar event), then this field describes the first option. |
| `dataConnector` | `string` `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections#DataConnector` resource. The data connector used for performing the action. |
| `dataSource` | `string` Output only. The name of the data source. |
| `invocationId` | `string` Output only. The action invocation ID. |
| `actionDisplayName` | `string` Output only. Human-readable name of the action that is displayed to the user. |
| `userConfirmationMessage` | `string` Output only. Human-readable message shown to the user along with the confirmation dialog. |
| `authorizationUrl` | `string` Output only. Authorization URL. |
| `resendQueryOnUserAuthorization` | `boolean` Output only. If true, caller must resend query upon user authorization. |
| `parameterDeclaration` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Output only. description of the parameters of the action including rendering/validation information. Its format is based on the OpenAPI's parameters specification. Based on: <https://swagger.io/docs/specification/describing-parameters/> **Example:** { "type": "object", "properties": { "title": { "type": "string", "description": "title of the event", }, "startTime": { "type": "string", "format": "date-time", "description": ( "Start time of the meeting, e.g. 2024-07-12T23:30" ), }, "attendees": { "type": "array", "items": {"type": "string", "format": "email"}, "description": "List of email addresses of attendees", }, "duration": { "type": "integer", "format": "int32", "minimum": 5, "maximum": 240, "default": { "numberValue": 30 }, "description": ( "Duration of the meeting in minutes. Defaults to 30" " minutes." ), }, "timezone": { "type": "string", "description": ( 'IANA time Zone Database name, e.g. "Europe/Zurich". If' " omitted, timezone of the user will be used" ), }, "eventType": { "type": "string", "enum": ["meeting", "focus_time", "out_of_office", "task"], "description": "type of the event", }, }, "required": ["startTime", "title", "attendees"] } |
| `argSetCandidates[]` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Output only. If there are multiple options for the action arguments (e.g., multiple possible time slots for a calendar event), these additional argument candidates are listed in this field. Contains a list of argument sets, each of which is formatted similarly as the args field. The argument sets only contain the arguments that differ from the args field. When offered to a user, these values might be editable. For example: `args` contains the first option with all the arguments: {"title": "Meeting with John", "startTime": "2024-08-01T13:30", ... } `argSetCandidates` contains the rest of the options, but only the differing arguments are populated: ` [{ "startTime": "2024-08-01T14:00" }, { "startTime": "2024-08-01T14:30" }, { "startTime": "2024-08-01T15:30" }] ` |
| `executedArgs` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Output only. Represents the arguments that were actually used for execution, potentially modified by the user from the initial args. |