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

Bulk import of multiple `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`s. Sample queries that already exist may be deleted.

Note: It is possible for a subset of the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`s to be successfully imported.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/sampleQuerySets/*}/sampleQueries:import`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`s under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "errorConfig": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/ImportErrorConfig`) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "inlineSource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/import#InlineSource`) }, "gcsSource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/GcsSource`) }, "bigquerySource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/BigQuerySource`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `errorConfig` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/ImportErrorConfig`)`` The desired location of errors incurred during the Import. |
| The source of the sample queries. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `inlineSource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/import#InlineSource`)`` The Inline source for sample query entries. |
| `gcsSource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/GcsSource`)`` Cloud Storage location for the input content. |
| `bigquerySource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/BigQuerySource`)`` BigQuery input source. |
| End of mutually exclusive fields. ||

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `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 `parent` resource:

- `discoveryengine.sampleQueries.import`

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

## InlineSource

The inline source for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`s.

| JSON representation |
|---|
| ``` { "sampleQueries": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`) } ] } ``` |

| Fields ||
|---|---|
| `sampleQueries[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`)`` Required. A list of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery`s to import. Max of 1000 items. |