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

**Full name**: projects.locations.instances.legacySoarReports.download

Triggers the immediate generation of a report file (e.g., `PDF`, `DOC`) based on a specific template and provided filters like environments and time ranges.

### HTTP request

`GET https://{endpoint}/v1alpha/{name}/legacySoarReports:legacyGenerateReportTemplate`

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 instance to generate the report template for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Query parameters

| Parameters ||
|---|---|
| `templateEncoded` | `string` Optional. Encoded report template here |
| `type` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/download#ReportTypeEnum`)`` Optional. The type of the report. |
| `environments[]` | `string` Required. The environments for the report template. |
| `timeFilter` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/download#DashboardTimeRangeTypesEnums`)`` Required. The time filter for the dashboard. |
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The report id. |

### Request body

The request body must be empty.

### Response body

Response message for legacySoarReports.download.

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

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

| Fields ||
|---|---|
| `media` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/MediaResponseInfo#Media`)`` Zipped file with the integration content. Includes the following folders: Actions, Connectors, Jobs, Managers, Dependencies Each folder includes json files and a python file for the script. Includes integration definition json file. Includes metadata.json file Information representing the imported data |

### 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.legacySoarReports.get`

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

## ReportTypeEnum

ReportTypeEnum defines the type of the report.

| Enums ||
|---|---|
| `PDF` | Pdf report type. |
| `RTF` | Rtf report type. |
| `DOC` | Doc report type. |
| `DOCX` | Docx report type. |
| `HTML` | Html report type. |
| `XLSX` | Xlsx report type. |
| `CSV` | Csv report type. |

## DashboardTimeRangeTypesEnums

LINT: LEGACY_NAMES DashboardTimeRangeTypesEnums is an enum that represents the time range types for a dashboard.

| Enums ||
|---|---|
| `DASHBOARD_TIME_RANGE_TYPE_UNSPECIFIED` | Custom time range |
| `LAST_DAY` | Last day |
| `LAST_3_DAYS` | Last 3 days |
| `LAST_WEEK` | Last week |
| `LAST_2_WEEKS` | Last 2 weeks |
| `LAST_MONTH` | Last month |
| `LAST_3_MONTHS` | Last 3 months |
| `LAST_6_MONTHS` | Last 6 months |
| `LAST_YEAR` | Last year |