# Binary Authorization API

The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run.

- [REST Resource: v1beta1.projects](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1beta1.projects)
- [REST Resource: v1beta1.projects.attestors](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1beta1.projects.attestors)
- [REST Resource: v1beta1.projects.policy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1beta1.projects.policy)
- [REST Resource: v1beta1.systempolicy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1beta1.systempolicy)
- [REST Resource: v1alpha2.projects](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1alpha2.projects)
- [REST Resource: v1alpha2.projects.attestors](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1alpha2.projects.attestors)
- [REST Resource: v1alpha2.projects.attestors.attestations](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1alpha2.projects.attestors.attestations)
- [REST Resource: v1alpha2.projects.continuousValidationConfig](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1alpha2.projects.continuousValidationConfig)
- [REST Resource: v1alpha2.projects.policy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1alpha2.projects.policy)
- [REST Resource: v1alpha2.systempolicy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1alpha2.systempolicy)
- [REST Resource: v1.projects](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1.projects)
- [REST Resource: v1.projects.attestors](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1.projects.attestors)
- [REST Resource: v1.projects.platforms.gke.policies](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1.projects.platforms.gke.policies)
- [REST Resource: v1.projects.platforms.policies](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1.projects.platforms.policies)
- [REST Resource: v1.projects.policy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1.projects.policy)
- [REST Resource: v1.systempolicy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest#v1.systempolicy)

## Service: binaryauthorization.googleapis.com

To call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

### Discovery document

A [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:

- <https://binaryauthorization.googleapis.com/$discovery/rest?version=v1>
- <https://binaryauthorization.googleapis.com/$discovery/rest?version=v1beta1>
- <https://binaryauthorization.googleapis.com/$discovery/rest?version=v1alpha2>

### Service endpoint

A [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

- `https://binaryauthorization.googleapis.com`

## REST Resource: [v1beta1.projects](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects/getPolicy` | `GET /v1beta1/{name=projects/*/policy}` A `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Policy` specifies the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor` that must attest to a container image, before the project is allowed to deploy that image. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects/updatePolicy` | `PUT /v1beta1/{policy.name=projects/*/policy}` Creates or updates a project's `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Policy`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Policy`. |

## REST Resource: [v1beta1.projects.attestors](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/create` | `POST /v1beta1/{parent=projects/*}/attestors` Creates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/delete` | `DELETE /v1beta1/{name=projects/*/attestors/*}` Deletes an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/get` | `GET /v1beta1/{name=projects/*/attestors/*}` Gets an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/getIamPolicy` | `GET /v1beta1/{resource=projects/*/attestors/*}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/list` | `GET /v1beta1/{parent=projects/*}/attestors` Lists `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/setIamPolicy` | `POST /v1beta1/{resource=projects/*/attestors/*}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/testIamPermissions` | `POST /v1beta1/{resource=projects/*/attestors/*}:testIamPermissions` Returns permissions that a caller has on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/update` | `PUT /v1beta1/{attestor.name=projects/*/attestors/*}` Updates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.attestors/validateAttestationOccurrence` | `POST /v1beta1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence` Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor` |

## REST Resource: [v1beta1.projects.policy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.policy)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.policy/getIamPolicy` | `GET /v1beta1/{resource=projects/*/policy}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.policy/setIamPolicy` | `POST /v1beta1/{resource=projects/*/policy}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/projects.policy/testIamPermissions` | `POST /v1beta1/{resource=projects/*/policy}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1beta1.systempolicy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/systempolicy)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1beta1/systempolicy/getPolicy` | `GET /v1beta1/{name=locations/*/policy}` Gets the current system policy in the specified location. |

## REST Resource: [v1alpha2.projects](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects/getContinuousValidationConfig (deprecated)` | `GET /v1alpha2/{name=projects/*/continuousValidationConfig}` Gets the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/ContinuousValidationConfig` for the project. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects/getPolicy` | `GET /v1alpha2/{name=projects/*/policy}` A `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Policy` specifies the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor` that must attest to a container image, before the project is allowed to deploy that image. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects/updateContinuousValidationConfig (deprecated)` | `PUT /v1alpha2/{config.name=projects/*/continuousValidationConfig}` Updates a project's `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/ContinuousValidationConfig`, and returns a copy of the new config. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects/updatePolicy` | `PUT /v1alpha2/{policy.name=projects/*/policy}` Creates or updates a project's `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Policy`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Policy`. |

## REST Resource: [v1alpha2.projects.attestors](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/create` | `POST /v1alpha2/{parent=projects/*}/attestors` Creates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/delete` | `DELETE /v1alpha2/{name=projects/*/attestors/*}` Deletes an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/get` | `GET /v1alpha2/{name=projects/*/attestors/*}` Gets an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/getIamPolicy` | `GET /v1alpha2/{resource=projects/*/attestors/*}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/list` | `GET /v1alpha2/{parent=projects/*}/attestors` Lists `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/setIamPolicy` | `POST /v1alpha2/{resource=projects/*/attestors/*}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/testIamPermissions` | `POST /v1alpha2/{resource=projects/*/attestors/*}:testIamPermissions` Returns permissions that a caller has on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/update` | `PUT /v1alpha2/{attestor.name=projects/*/attestors/*}` Updates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/Shared.Types/Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors/validateAttestationOccurrence` | `POST /v1alpha2/{attestor=projects/*/attestors/*}:validateAttestationOccurrence` Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor` |

## REST Resource: [v1alpha2.projects.attestors.attestations](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors.attestations)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.attestors.attestations/testIamPermissions` | `POST /v1alpha2/{resource=projects/*/attestors/*/attestations/*}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1alpha2.projects.continuousValidationConfig](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.continuousValidationConfig)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.continuousValidationConfig/getIamPolicy` | `GET /v1alpha2/{resource=projects/*/continuousValidationConfig}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.continuousValidationConfig/setIamPolicy` | `POST /v1alpha2/{resource=projects/*/continuousValidationConfig}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.continuousValidationConfig/testIamPermissions` | `POST /v1alpha2/{resource=projects/*/continuousValidationConfig}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1alpha2.projects.policy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.policy)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.policy/getIamPolicy` | `GET /v1alpha2/{resource=projects/*/policy}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.policy/setIamPolicy` | `POST /v1alpha2/{resource=projects/*/policy}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/projects.policy/testIamPermissions` | `POST /v1alpha2/{resource=projects/*/policy}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1alpha2.systempolicy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/systempolicy)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1alpha2/systempolicy/getPolicy` | `GET /v1alpha2/{name=locations/*/policy}` Gets the current system policy in the specified location. |

## REST Resource: [v1.projects](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects/getPolicy` | `GET /v1/{name=projects/*/policy}` A `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy` specifies the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor` that must attest to a container image, before the project is allowed to deploy that image. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects/updatePolicy` | `PUT /v1/{policy.name=projects/*/policy}` Creates or updates a project's `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy`. |

## REST Resource: [v1.projects.attestors](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create` | `POST /v1/{parent=projects/*}/attestors` Creates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/delete` | `DELETE /v1/{name=projects/*/attestors/*}` Deletes an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/get` | `GET /v1/{name=projects/*/attestors/*}` Gets an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/getIamPolicy` | `GET /v1/{resource=projects/*/attestors/*}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/list` | `GET /v1/{parent=projects/*}/attestors` Lists `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/setIamPolicy` | `POST /v1/{resource=projects/*/attestors/*}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/testIamPermissions` | `POST /v1/{resource=projects/*/attestors/*}:testIamPermissions` Returns permissions that a caller has on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/update` | `PUT /v1/{attestor.name=projects/*/attestors/*}` Updates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/validateAttestationOccurrence` | `POST /v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence` Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor` |

## REST Resource: [v1.projects.platforms.gke.policies](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.gke.policies)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.gke.policies/evaluate` | `POST /v1/{name=projects/*/platforms/gke/policies/*}:evaluate` Evaluates a Kubernetes object versus a GKE `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`. |

## REST Resource: [v1.projects.platforms.policies](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/create` | `POST /v1/{parent=projects/*/platforms/*}/policies` Creates a `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`, and returns a copy of it. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/delete` | `DELETE /v1/{name=projects/*/platforms/*/policies/*}` Deletes a `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/get` | `GET /v1/{name=projects/*/platforms/*/policies/*}` Gets a `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/list` | `GET /v1/{parent=projects/*/platforms/*}/policies` Lists `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy` owned by a project in the specified platform. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/replacePlatformPolicy` | `PUT /v1/{policy.name=projects/*/platforms/*/policies/*}` Replaces a `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`. |

## REST Resource: [v1.projects.policy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy/getIamPolicy` | `GET /v1/{resource=projects/*/policy}:getIamPolicy` Gets the access control policy for a resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy/setIamPolicy` | `POST /v1/{resource=projects/*/policy}:setIamPolicy` Sets the access control policy on the specified resource. |
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy/testIamPermissions` | `POST /v1/{resource=projects/*/policy}:testIamPermissions` Returns permissions that a caller has on the specified resource. |

## REST Resource: [v1.systempolicy](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/systempolicy)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/systempolicy/getPolicy` | `GET /v1/{name=locations/*/policy}` Gets the current system policy in the specified location. |