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

**Full name**: projects.locations.instances.nativeDashboards.editChart

Edit chart in a dashboard.

### HTTP request

`POST https://{endpoint}/v1alpha/{name}:editChart`

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 dashboard name to edit chart in. Format: projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "dashboardQuery": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.dashboardQueries#DashboardQuery`) }, "dashboardChart": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.dashboardCharts#DashboardChart`) }, "editMask": string, "languageFeatures": [ enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LanguageFeature`) ] } ``` |

| Fields ||
|---|---|
| `dashboardQuery` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.dashboardQueries#DashboardQuery`)`` Optional. Query for the edited chart. |
| `dashboardChart` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.dashboardCharts#DashboardChart`)`` Optional. Edited chart. |
| `editMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The list of fields to edit for chart and query. Supported paths in chart are - dashboardChart.display_name dashboardChart.description dashboardChart.chart_datasource.data_sources dashboardChart.visualization dashboardChart.visualization.button dashboardChart.visualization.markdown dashboardChart.drill_down_config Supported paths in query are - dashboardQuery.query dashboardQuery.input dashboardQuery.dialect This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `languageFeatures[]` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LanguageFeature`)`` Optional. Language Features present in the query. |

### Response body

Response message for editing chart in a dashboard.

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

| JSON representation |
|---|
| ``` { "nativeDashboard": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.nativeDashboards#NativeDashboard`) }, "dashboardChart": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.dashboardCharts#DashboardChart`) } } ``` |

| Fields ||
|---|---|
| `nativeDashboard` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.nativeDashboards#NativeDashboard`)`` Edited dashboard. |
| `dashboardChart` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.dashboardCharts#DashboardChart`)`` Edited chart resource. |

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

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