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

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

Legacy endpoint for getting events for a raw log search.

### HTTP request

`GET https://{endpoint}/v1alpha/{instance}/legacy:legacySearchRawLogs`

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

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. Chronicle instance this request is sent to. Format: projects/{project}/locations/{location}/instances/{instance} |

### Query parameters

| Parameters ||
|---|---|
| `query` | `string` Required. Search query to match raw logs. |
| `timestampRange` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`)`` Required. Timestamp range to query within \[inclusive start time, exclusive end time). |
| `maxResults` | `integer` The maximum number of results to return. |
| `regexSearch` | `boolean` Whether search by query as a regex query, or not. By default it is false. |
| `caseSensitive` | `boolean` Whether search in case sensitivity, or not. By default it is false. |
| `productSources[]` | `string` Specific product sources to search for, if unspecified all product sources will be included in the search. |

### Request body

The request body must be empty.

### Response body

Message passed back to the client containing the search results.

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

| JSON representation |
|---|
| ``` { "domainNetworkEvents": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/SearchResult`) } ], "alerts": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/AssetAlertEvent`) } ], "ipNetworkEvents": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/IpNetworkEvent`) } ], "edrEvents": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/AssetEdrEvent`) } ], "typedUserEvents": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/UserEvent`) } ], "rawLogEvents": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#RawLogEvent`) } ], "genericEvents": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#GenericEvent`) } ], "events": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#EventInfo`) } ], "totalRecords": string, "tooManyResults": boolean, "md5FileHashes": [ string ], "sha1FileHashes": [ string ], "sha256FileHashes": [ string ], "rawLogBucketStats": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#RawLogBucketStat`) } ], "validationError": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#SearchRawLogsValidationError`) }, "maxReturnedRawLogLines": string, "rawLogBucketStatFrequency": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#RawLogBucketSize`) } ``` |

| Fields ||
|---|---|
| `domainNetworkEvents[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/SearchResult`)`` A list of normalized network events with domains associated with them. DomainNetworkEvent would be a more accurate name for this message type. Network events that have no domains are returned in ipNetworkEvents. Sorting order not guaranteed. |
| `alerts[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/AssetAlertEvent`)`` A list of alerts returned for above query. This will be populated only for an asset being queried. Sorting order not guaranteed. |
| `ipNetworkEvents[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/IpNetworkEvent`)`` A list of domain-less network events. Sorting order not guaranteed. |
| `edrEvents[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/AssetEdrEvent`)`` A list of EDR events. Sorting order not guaranteed. |
| `typedUserEvents[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/UserEvent`)`` A list of User events. Sorting order is not guaranteed. |
| `rawLogEvents[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#RawLogEvent`)`` A list of Raw Log entries from which no normalized event was produced. By default the chip will be populated as "Unparsed Raw Log" Sorting order not guaranteed. |
| `genericEvents[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#GenericEvent`)`` A list of Generic events. Sorting order not guaranteed. |
| `events[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#EventInfo`)`` List of normalized events for a given query and time range. Sorting order not guaranteed. |
| `totalRecords` | `string (https://developers.google.com/discovery/v1/type-format format)` The total number of scanned raw log lines. |
| `tooManyResults` | `boolean` If there are too many results to return and some have been omitted. |
| `md5FileHashes[]` | `string` All unique md5 file hashes within all events being returned. |
| `sha1FileHashes[]` | `string` All unique sha1 file hashes within all events being returned. |
| `sha256FileHashes[]` | `string` All unique sha256 file hashes within all events being returned. |
| `rawLogBucketStats[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#RawLogBucketStat`)`` The raw log scan status of every bucket. |
| `validationError` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#SearchRawLogsValidationError`)`` The validation error returned by the search. |
| `maxReturnedRawLogLines` | `string (https://developers.google.com/discovery/v1/type-format format)` The max number of raw log lines will be returned. |
| `rawLogBucketStatFrequency` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#RawLogBucketSize`)`` The frequency of RawLogBucketStats captures raw log counts. Currently only supports day and hour. |

### 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 `instance` resource:

- `chronicle.legacies.legacySearchRawLogs`

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

## RawLogEvent

Raw log event passed back to the client. This is an event that was not normalized as any other event type.

| JSON representation |
|---|
| ``` { "eventTime": string, "chip": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Chip`) }, "snippet": string, "rawLogsToken": string, "filterProperties": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/FilterProperties`) } } ``` |

| Fields ||
|---|---|
| `eventTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Date/time of event (i.e. not the time that the event was ingested) Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `chip` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Chip`)`` The chip to display. |
| `snippet` | `string` Snippet of the log event. This will contain the queried term and preceding preceding 10 characters (if available). |
| `rawLogsToken` | `string` A token to request raw logs, this is opaque to the client. |
| `filterProperties` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/FilterProperties`)`` A list of filter properties associated the event. |

## GenericEvent

Represents all telemetry data associated with a generic event for returning to the client. It is the search code's responsibility to convert UDM into this format.

| JSON representation |
|---|
| ``` { "eventTime": string, "chip": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Chip`) }, "filterProperties": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/FilterProperties`) }, "rawLogsToken": string, "sourceUdmEventInfo": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/UdmEventInfo`) } } ``` |

| Fields ||
|---|---|
| `eventTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Date/time of the event. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `chip` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/Chip`)`` The chip to display. |
| `filterProperties` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/FilterProperties`)`` A list of filter properties associated the event. |
| `rawLogsToken` | `string` A token to request raw logs, this is opaque to the client. If empty, no raw logs can be requested. |
| `sourceUdmEventInfo` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/UdmEventInfo`)`` The source UDM event info. |

## EventInfo

EventInfo is a wrapper containing a UDM or Entity event and its token.

| JSON representation |
|---|
| ``` { "token": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "event": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#UDM`) }, "entity": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.entities#Entity`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `token` | `string` The token for the UDM or Entity event. |
| `event_info` contains either UDM event or Entity event. Even though entities contain context information, they are ingested and processed in indexing/search as events. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `event` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#UDM`)`` A UDM event. |
| `entity` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.entities#Entity`)`` An Entity event. |
| End of mutually exclusive fields. ||

## RawLogBucketStat

Number of raw log lines for one bucket (interval of time).

| JSON representation |
|---|
| ``` { "eventTime": string, "totalRawLogLines": integer, "returnedRawLogLines": integer, "scanSucceeded": boolean, "tooManyResults": boolean } ``` |

| Fields ||
|---|---|
| `eventTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The start time of bucket. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `totalRawLogLines` | `integer` The number of raw log lines matched search query in this bucket. If `tooManyResults` is True, then this number is not the accurate number. |
| `returnedRawLogLines` | `integer` The number of raw log lines converted to events in response in this bucket. |
| `scanSucceeded` | `boolean` The process status of bucket. If the flag is false, it means backend failed to scan this bucket. By default it is false. |
| `tooManyResults` | `boolean` If there are too many results to return and some have been omitted. |

## SearchRawLogsValidationError

SearchRawLogsValidationError contains ValidationErrorCode and a string to specify error details.

| JSON representation |
|---|
| ``` { "errorCode": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#ValidationErrorCode`), "errorMessage": string } ``` |

| Fields ||
|---|---|
| `errorCode` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacySearchRawLogs#ValidationErrorCode`)`` A Enum to indicate the errorCode. |
| `errorMessage` | `string` A string to specify error details. |

## ValidationErrorCode

Specific Raw Log Scan validation errors.

| Enums ||
|---|---|
| `VALIDATION_ERROR_CODE_UNSPECIFIED` | Unspecified validation error. |
| `VALIDATION_ERROR_CODE_INVALID_REGEX` | The request query isn't a valid regex. |
| `VALIDATION_ERROR_CODE_QUERY_TOO_LONG` | The request query is too long. |
| `VALIDATION_ERROR_CODE_QUERY_TOO_SHORT` | The request query is too short. |
| `VALIDATION_ERROR_CODE_QUERY_OVER_LONG_TIME_RANGE` | The query searches over a long time range. |

## RawLogBucketSize

The frequency of RawLogBucketSize captures raw log counts.

| Enums ||
|---|---|
| `RAW_LOG_BUCKET_SIZE_UNSPECIFIED` | UNSPECIFIED, this should not happen. |
| `RAW_LOG_BUCKET_SIZE_DAY` | RawLogBucketStat bucketed by day. |
| `RAW_LOG_BUCKET_SIZE_HOUR` | RawLogBucketStat bucketed by hour. |