# Method: projects.attestors.validateAttestationOccurrence

- [HTTP request](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence#body.aspect)

Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor`

### HTTP request

`POST https://binaryauthorization.googleapis.com/v1beta1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence`

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

### Path parameters

| Parameters ||
|---|---|
| `attestor` | `string` Required. The resource name of the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor` of the \[occurrence\]\[grafeas.v1.Occurrence\], in the format `projects/*/attestors/*`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `attestor`: - `binaryauthorization.attestors.verifyImageAttested` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "attestation": { object (`https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/ValidateAttestationOccurrenceRequest#AttestationOccurrence`) }, "occurrenceNote": string, "occurrenceResourceUri": string } ``` |

| Fields ||
|---|---|
| `attestation` | ``object (`https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/ValidateAttestationOccurrenceRequest#AttestationOccurrence`)`` Required. An `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/ValidateAttestationOccurrenceRequest#AttestationOccurrence` to be checked that it can be verified by the `Attestor`. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid `AttestationOccurrence`. |
| `occurrenceNote` | `string` Required. The resource name of the \[Note\]\[grafeas.v1.Note\] to which the containing \[Occurrence\]\[grafeas.v1.Occurrence\] is associated. |
| `occurrenceResourceUri` | `string` Required. The URI of the artifact (e.g. container image) that is the subject of the containing \[Occurrence\]\[grafeas.v1.Occurrence\]. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/ValidateAttestationOccurrenceResponse`.

### Authorization scopes

Requires the following OAuth scope:

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

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