- [HTTP request](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#body.aspect)
- [Try it!](https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings/setState#try-it)

Updates the state of a finding. If no location is specified, finding is assumed to be in global

### IAM Permissions

Requires the following IAM permission on the resource specified in the `name` field:

- `securitycenter.findings.setState`

### HTTP request

Choose an endpoint:
global me-central2 us eu   
`POST https://securitycenter.googleapis.com/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. If no location is specified, finding is assumed to be in global. The following list shows some examples: + `organizations/{organizationId}/sources/{source_id}/findings/{findingId}` + `organizations/{organizationId}/sources/{source_id}/locations/{locationId}/findings/{findingId}` + `folders/{folder_id}/sources/{source_id}/findings/{findingId}` + `folders/{folder_id}/sources/{source_id}/locations/{locationId}/findings/{findingId}` + `projects/{projectId}/sources/{source_id}/findings/{findingId}` + `projects/{projectId}/sources/{source_id}/locations/{locationId}/findings/{findingId}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "state": enum (`https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings#Finding.State`) } ``` |

| Fields ||
|---|---|
| `state` | ``enum (`https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings#Finding.State`)`` Required. The desired State of the finding. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/rest/v2/folders.sources.locations.findings#Finding`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/securitycenter`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).