# Method: photos.batchDelete

- [HTTP request](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.request_body)
  - [JSON representation](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.response_body)
  - [JSON representation](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.BatchDeletePhotosResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.aspect)
- [Try it!](https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#try-it)

Deletes a list of `https://developers.google.com/streetview/publish/reference/rest/v1/photo#Photo` and their metadata.

Note that if `https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos` fails, either critical fields are missing or there is an authentication error. Even if `https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#google.streetview.publish.v1.StreetViewPublishService.BatchDeletePhotos` succeeds, individual photos in the batch may have failures. These failures are specified in each `https://developers.google.com/streetview/publish/reference/rest/v1/PhotoResponse#FIELDS.status` in `https://developers.google.com/streetview/publish/reference/rest/v1/photos/batchDelete#body.BatchDeletePhotosResponse.FIELDS.status`. See `https://developers.google.com/streetview/publish/reference/rest/v1/photo/delete#google.streetview.publish.v1.StreetViewPublishService.DeletePhoto` for specific failures that can occur per photo.

### HTTP request

`POST https://streetviewpublish.googleapis.com/v1/photos:batchDelete`

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

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "photoIds": [ string ] } ``` |

| Fields ||
|---|---|
| `photoIds[]` | `string` Required. IDs of the `https://developers.google.com/streetview/publish/reference/rest/v1/photo#Photo`. HTTP GET requests require the following syntax for the URL query parameter: `photoIds=<id1>&photoIds=<id2>&...`. |

### Response body

Response to batch delete of one or more `https://developers.google.com/streetview/publish/reference/rest/v1/photo#Photo`.

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

| JSON representation |
|---|
| ``` { "status": [ { object (`https://developers.google.com/streetview/publish/reference/rest/v1/Status`) } ] } ``` |

| Fields ||
|---|---|
| `status[]` | ``object (`https://developers.google.com/streetview/publish/reference/rest/v1/Status`)`` The status for the operation to delete a single `https://developers.google.com/streetview/publish/reference/rest/v1/photo#Photo` in the batch request. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/streetviewpublish`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).