# Method: debug.datasources.items.searchByViewUrl

- [HTTP request](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.request_body)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.SearchItemsByViewUrlResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#body.aspect)
- [Try it!](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/debug.datasources.items/searchByViewUrl#try-it)

Fetches the item whose viewUrl exactly matches that of the URL provided in the request.

**Note:** This API requires an admin account to execute.

### HTTP request

`POST https://cloudsearch.googleapis.com/v1/debug/{name=datasources/*}/items:searchByViewUrl`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Source name, format: datasources/{sourceId} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "viewUrl": string, "pageToken": string, "debugOptions": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/DebugOptions`) } } ``` |

| Fields ||
|---|---|
| `viewUrl` | `string` Specify the full view URL to find the corresponding item. The maximum length is 2048 characters. |
| `pageToken` | `string` The nextPageToken value returned from a previous request, if any. |
| `debugOptions` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/DebugOptions`)`` Common debug options. |

### Response body

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

| JSON representation |
|---|
| ``` { "items": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#Item`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `items[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#Item`)`` |
| `nextPageToken` | `string` Token to retrieve the next page of results, or empty if there are no more results in the list. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud_search.debug`
- `https://www.googleapis.com/auth/cloud_search`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).