- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.request_body)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.LegacySearchRawLogsV2Response.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogsV2#body.aspect_1)

**Full name**: projects.locations.instances.legacy.legacySearchRawLogsV2

Searches for raw logs within a specified Google SecOps instance.

### HTTP request

`GET https://{endpoint}/v1alpha/{name}/legacy:legacySearchRawLogsV2`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The Google SecOps instance to send the request to. Format: `projects/{project}/locations/{location}/instances/{instance}` |

### Query parameters

| Parameters ||
|---|---|
| `query` | `string` Required. The raw log query to search for. Example: `raw = /.*/ logSource IN ["Okta"] parsed = true.` |
| `timeRange` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`)`` Required. The time range to search within. This includes the start time and excludes the end time. |
| `limit` | `integer` Optional. The maximum number of results to return for the query. Any value over 10,000 is coerced to 10,000. |

### Request body

The request body must be empty.

### Response body

Response of raw log search.

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

| JSON representation |
|---|
| ``` { "matches": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RawLogResult`) } ] } ``` |

| Fields ||
|---|---|
| `matches[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RawLogResult`)`` A list of the raw log results that match the query. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

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:

- `chronicle.events.searchRawLogs`

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