# Method: projects.getPolicy

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

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. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy` for this project. Returns a default `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy` if the project does not have one.

### HTTP request

`GET https://binaryauthorization.googleapis.com/v1/{name=projects/*/policy}`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy` to retrieve, in the format `projects/*/policy`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `binaryauthorization.policy.get` |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.policy#Policy`.

### 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/).