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

**Full name**: projects.locations.instances.operations.streamSearch

Streams the results of an in-progress search operation, or returns the final results of a completed operation.

### HTTP request

`GET https://{endpoint}/v1alpha/{name}:streamSearch`

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 name of the operation resource to stream results from. Format: projects/{project}/locations/{location}/instances/{instance}/operations/{operation} |

### Query parameters

| Parameters ||
|---|---|
| `eventIndexStart` | `integer` Optional. Event index to start from. If unset (or 0), entire result set will be returned. |
| `eventIndexEnd` | `integer` Optional. Last event index. |
| `pageRequest` | `boolean` Optional. For page request, trim the response to only include requested events. If true, only the events in the range \[eventIndexStart, eventIndexEnd) will be returned and non-event data will be omitted. If paginationEnabled is false, this field is ignored. |
| `sortAscending` | `boolean` Optional. Sort order for the results, default is descending, i.e., false. |
| `sortColumn` | `string` Optional. Sort column name for the results, default is based on timestamp. |
| `paginationEnabled` | `boolean` Optional. If true, pagination is enabled for the operations.streamSearch RPC. It has to be set to true for all page requests. |
| `resultsType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.operations/streamSearch#ResultsType`)`` Optional. For a Search, this field specifies which results to return. |

### Request body

The request body must be empty.

### Response body

The current state of a search operation.

For the types of `metadata` and `response`, see documentation for the method that created the operation.

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

| JSON representation |
|---|
| ``` { "operation": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`) } } ``` |

| Fields ||
|---|---|
| `operation` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`)`` The current state of the operation, including the latest streaming response. |

### 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.operations.streamSearch`

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

## ResultsType

The type of results to return for a Search operation, which can be default, timed, or timeless.

| Enums ||
|---|---|
| `RESULTS_TYPE_UNSPECIFIED` | Indicates the default behavior for all types of searches. Additionally for ECG Search, it will return both timed and timeless results. |
| `TIMED` | Return timed results only. |
| `TIMELESS` | Return timeless results only. |