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

**Full name**: projects.locations.instances.legacySoarDashboard.legacyAddOrUpdateDashboard

Adds a new dashboard or updates an existing one (determined by dashboard identifier). Users can specify environments, allowed users, and a set of widgets for the dashboard.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}/legacySoarDashboard:legacyAddOrUpdateDashboard`

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 name of the parent resource, which is the SecOps instance to get the workflow menu cards for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "id": integer, "creator": string, "name": string, "defaultTimeRange": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/DashboardTimeRangeTypesEnums`), "environments": [ string ], "allowedUsersJson": string, "allowedUsers": [ string ], "widgets": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacySoarDashboardWidgetDataModel`) } ] } ``` |

| Fields ||
|---|---|
| `id` | `integer` Required. The ID of the dashboard. |
| `creator` | `string` Optional. The creator of the dashboard. |
| `name` | `string` Optional. The name of the dashboard. |
| `defaultTimeRange` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/DashboardTimeRangeTypesEnums`)`` Optional. The default time range of the dashboard. |
| `environments[]` | `string` Optional. The environments of the dashboard. |
| `allowedUsersJson` | `string` Optional. The allowed users of the dashboard in json format. |
| `allowedUsers[]` | `string` Optional. The allowed users of the dashboard. |
| `widgets[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacySoarDashboardWidgetDataModel`)`` Optional. The widgets of the dashboard. |

### Response body

AddOrUpdateLegacySoarDashboardResponse is the response message for the AddOrUpdateLegacySoarDashboard RPC.

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

| JSON representation |
|---|
| ``` { "id": integer, "creator": string, "name": string, "defaultTimeRange": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/DashboardTimeRangeTypesEnums`), "allowedUsersJson": string, "allowedUsers": [ string ], "widgets": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacySoarDashboardWidgetDataModel`) } ], "environmentsJson": string, "environments": [ string ], "creationTimeUnixTimeInMs": string, "lastModifiedTimeUnixTimeInMs": string } ``` |

| Fields ||
|---|---|
| `id` | `integer` Required. The ID of the dashboard. |
| `creator` | `string` Required. The creator of the dashboard. |
| `name` | `string` Required. The name of the dashboard. |
| `defaultTimeRange` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/DashboardTimeRangeTypesEnums`)`` Required. The default time range of the dashboard. |
| `allowedUsersJson` | `string` Required. The allowed users of the dashboard in json format. |
| `allowedUsers[]` | `string` Required. The allowed users of the dashboard. |
| `widgets[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacySoarDashboardWidgetDataModel`)`` Required. The widgets of the dashboard. |
| `environmentsJson` | `string` Required. The environments of the dashboard in json format. |
| `environments[]` | `string` Required. The environments of the dashboard. |
| `creationTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. The creation time of the dashboard. |
| `lastModifiedTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. The last modified time of the dashboard. |

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

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