- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.aspect)

Sets the URI Pattern to Document data mapping for an Advanced Site Search DataStore.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{siteSearchEngine=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}:setUriPatternDocumentData`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `siteSearchEngine` | `string` Required. Full resource name of the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/SiteSearchEngine`, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "documentDataMap": { string: { object }, ... }, "emptyDocumentDataMap": boolean, "schema": { object } } ``` |

| Fields ||
|---|---|
| `documentDataMap` | ``map (key: string, value: object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format))`` Document data keyed by URI pattern. Each entry must be consistent with the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.schemas#Schema`. For example: `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.schemas#Schema` = { "type": "object", "properties": { "Categories": { "type": "array", "items": { "retrievable": true, "type": "string" } } } documentDataMap = { "www.url1.com/\*": { "Categories": \["category1", "category2"\] }, "www.url2.com/\*": { "Categories": \["category3"\] } } |
| `emptyDocumentDataMap` | `boolean` If true, clears the document data map. If true, `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.siteSearchEngine/setUriPatternDocumentData#body.request_body.FIELDS.document_data_map` must be empty. |
| `schema` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. If not provided, the current `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.schemas#Schema` is used. If provided, validates and updates the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.schemas#Schema`. If validation fails, an error is returned. |

### 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).