- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.LegacyAddOrUpdateReportScheduleResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#body.aspect_1)
- [ApiReportScheduleIntervalTypeEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiReportScheduleIntervalTypeEnum)
- [ApiWeeklyDayEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiWeeklyDayEnum)
- [ReportTypeEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ReportTypeEnum)
- [DashboardTimeRangeTypesEnums](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#DashboardTimeRangeTypesEnums)
- [ApiReportScheduleIntervalTypeEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiReportScheduleIntervalTypeEnum_1)
- [ApiWeeklyDayEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiWeeklyDayEnum_1)
- [ReportTypeEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ReportTypeEnum_1)
- [DashboardTimeRangeTypesEnums](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#DashboardTimeRangeTypesEnums_1)

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

Adds a new report schedule or updates an existing one. Schedules define when and how frequently a report should be automatically generated and distributed to specified recipients.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}/legacySoarReports:legacyAddOrUpdateReportSchedule`

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. The instance to get the data sources for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "id": string, "reportTemplateId": string, "isEnabled": boolean, "environments": [ string ], "recipentsEmail": [ string ], "message": string, "timeOfDayHours": number, "intervalType": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiReportScheduleIntervalTypeEnum`), "weeklyDays": [ enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiWeeklyDayEnum`) ], "type": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ReportTypeEnum`), "timeFilter": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#DashboardTimeRangeTypesEnums`), "dayOfTheMonth": integer } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The ID of the report schedule. |
| `reportTemplateId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the report template. |
| `isEnabled` | `boolean` Required. Whether the report schedule is enabled. |
| `environments[]` | `string` Required. The environments for the report schedule. |
| `recipentsEmail[]` | `string` Required. The email addresses of the recipients of the report. |
| `message` | `string` Required. The message of the report. |
| `timeOfDayHours` | `number` Required. The time of day in hours for the report schedule. |
| `intervalType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiReportScheduleIntervalTypeEnum`)`` Required. The interval type of the report schedule. |
| `weeklyDays[]` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiWeeklyDayEnum`)`` Required. The days of the week for the report schedule. |
| `type` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ReportTypeEnum`)`` Required. The type of the report. |
| `timeFilter` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#DashboardTimeRangeTypesEnums`)`` Required. The time filter for the dashboard. |
| `dayOfTheMonth` | `integer` Optional. The day of the month for the report schedule. |

### Response body

Response message for legacySoarReports.legacyAddOrUpdateReportSchedule.

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

| JSON representation |
|---|
| ``` { "id": string, "reportTemplateId": string, "environments": [ string ], "recipentsEmail": [ string ], "message": string, "timeOfDayHours": number, "intervalType": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiReportScheduleIntervalTypeEnum_1`), "weeklyDays": [ enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiWeeklyDayEnum_1`) ], "type": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ReportTypeEnum_1`), "timeFilter": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#DashboardTimeRangeTypesEnums_1`), "isEnabled": boolean, "dayOfTheMonth": integer } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The ID of the report schedule. |
| `reportTemplateId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the report template. |
| `environments[]` | `string` Required. The environments for the report schedule. |
| `recipentsEmail[]` | `string` Required. The email addresses of the recipients of the report. |
| `message` | `string` The message of the report. |
| `timeOfDayHours` | `number` Required. The time of day in hours for the report schedule. |
| `intervalType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiReportScheduleIntervalTypeEnum_1`)`` Required. The interval type of the report schedule. |
| `weeklyDays[]` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ApiWeeklyDayEnum_1`)`` Required. The days of the week for the report schedule. |
| `type` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#ReportTypeEnum_1`)`` Required. The type of the report. |
| `timeFilter` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarReports/legacyAddOrUpdateReportSchedule#DashboardTimeRangeTypesEnums_1`)`` Required. The time filter for the dashboard. |
| `isEnabled` | `boolean` Required. Whether the report schedule is enabled. |
| `dayOfTheMonth` | `integer` Optional. The day of the month for the report schedule. |

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

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

## ApiReportScheduleIntervalTypeEnum

ApiReportScheduleIntervalTypeEnum defines the interval type of the report schedule.

| Enums ||
|---|---|
| `DAILY` | Daily interval type. |
| `WEEKLY` | Weekly interval type. |
| `MONTHLY` | Monthly interval type. |

## ApiWeeklyDayEnum

ApiWeeklyDayEnum defines the days of the week.

| Enums ||
|---|---|
| `SUNDAY` | Sunday. |
| `MONDAY` | Monday. |
| `TUESDAY` | Tuesday. |
| `WEDNESDAY` | Wednesday. |
| `THURSDAY` | Thursday. |
| `FRIDAY` | Friday. |
| `SATURDAY` | Saturday. |

## 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

DashboardTimeRangeTypesEnums defines the time range types for the dashboard.

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

## ApiReportScheduleIntervalTypeEnum

ApiReportScheduleIntervalTypeEnum defines the interval type of the report schedule.

| Enums ||
|---|---|
| `DAILY` | Daily interval type. |
| `WEEKLY` | Weekly interval type. |
| `MONTHLY` | Monthly interval type. |

## ApiWeeklyDayEnum

ApiWeeklyDayEnum defines the days of the week.

| Enums ||
|---|---|
| `SUNDAY` | Sunday. |
| `MONDAY` | Monday. |
| `TUESDAY` | Tuesday. |
| `WEDNESDAY` | Wednesday. |
| `THURSDAY` | Thursday. |
| `FRIDAY` | Friday. |
| `SATURDAY` | Saturday. |

## 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

DashboardTimeRangeTypesEnums defines the time range types for the dashboard.

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