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

Estimates the data size to be used by a customer.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{location=projects/*/locations/*}:estimateDataSize`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `location` | `string` Required. Full resource name of the location, such as `projects/{project}/locations/{location}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "websiteDataSource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations/estimateDataSize#WebsiteDataSource`) }, "fileDataSource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations/estimateDataSize#FileDataSource`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Data source for which we are estimating its size. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `websiteDataSource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations/estimateDataSize#WebsiteDataSource`)`` Website data. |
| `fileDataSource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations/estimateDataSize#FileDataSource`)`` Structured or unstructured data. |
| 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 `location` resource:

- `discoveryengine.locations.estimateDataSize`

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

## WebsiteDataSource

Data source is a set of website patterns that we crawl to get the total number of websites.

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

| Fields ||
|---|---|
| `estimatorUriPatterns[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations/estimateDataSize#EstimatorUriPattern`)`` Required. The URI patterns to estimate the data sizes. At most 10 patterns are allowed, otherwise an INVALID_ARGUMENT error is thrown. |

## EstimatorUriPattern

URI patterns that we use to crawl.

| JSON representation |
|---|
| ``` { "providedUriPattern": string, "exactMatch": boolean, "exclusive": boolean } ``` |

| Fields ||
|---|---|
| `providedUriPattern` | `string` User provided URI pattern. For example, `foo.com/bar/*`. |
| `exactMatch` | `boolean` Whether we infer the generated URI or use the exact provided one. |
| `exclusive` | `boolean` Whether the pattern is exclusive or not. If set to true, the pattern is considered exclusive. If unset or set to false, the pattern is considered inclusive by default. |

## FileDataSource

Data source contains files either in Cloud Storage or BigQuery.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "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 ||
|---|---|
| Which source contains the files to be used. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `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. ||