Method: photos.batchDelete
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://streetviewpublish.googleapis.com/v1/photos:batchDelete
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"photoIds": [
string
]
} |
字段 |
photoIds[] |
string
必需。Photos 的 ID。HTTP GET 请求需要网址查询参数使用以下语法:photoIds=<id1>&photoIds=<id2>&... 。
|
响应正文
对批量删除一个或多个 Photos
的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"status": [
{
object (Status )
}
]
} |
字段 |
status[] |
object (Status )
在批量请求中删除单个 Photo 的操作的状态。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/streetviewpublish
如需了解详情,请参阅 OAuth 2.0 概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003ephotos.batchDelete\u003c/code\u003e API allows for deleting multiple photos and their metadata within Street View Publish.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a list of \u003ccode\u003ephotoIds\u003c/code\u003e for the photos to be deleted.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides individual status updates for each photo deletion attempt.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e scope is necessary.\u003c/p\u003e\n"],["\u003cp\u003eFailures may occur for individual photos even if the overall batch deletion request is successful, details of which can be found in the response.\u003c/p\u003e\n"]]],["This describes how to batch delete photos and their metadata via a POST request to `https://streetviewpublish.googleapis.com/v1/photos:batchDelete`. The request body requires a JSON array of `photoIds`. The response body includes an array of `status` objects, indicating the success or failure of each individual photo deletion. Authentication requires the `https://www.googleapis.com/auth/streetviewpublish` OAuth scope. The URL uses gRPC transcoding. Failures may occur due to missing fields or authentication errors.\n"],null,["# Method: photos.batchDelete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchDeletePhotosResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a list of [Photos](/streetview/publish/reference/rest/v1/photo#Photo) and their metadata.\n\nNote that if [photos.batchDelete](/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 [photos.batchDelete](/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 [PhotoResponse.status](/streetview/publish/reference/rest/v1/PhotoResponse#FIELDS.status) in [BatchDeletePhotosResponse.results](/streetview/publish/reference/rest/v1/photos/batchDelete#body.BatchDeletePhotosResponse.FIELDS.status). See [photo.delete](/streetview/publish/reference/rest/v1/photo/delete#google.streetview.publish.v1.StreetViewPublishService.DeletePhoto) for specific failures that can occur per photo.\n\n### HTTP request\n\n`POST https://streetviewpublish.googleapis.com/v1/photos:batchDelete`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------|\n| ``` { \"photoIds\": [ string ] } ``` |\n\n| Fields ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `photoIds[]` | `string` Required. IDs of the [Photos](/streetview/publish/reference/rest/v1/photo#Photo). HTTP GET requests require the following syntax for the URL query parameter: `photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`. |\n\n### Response body\n\nResponse to batch delete of one or more [Photos](/streetview/publish/reference/rest/v1/photo#Photo).\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------|\n| ``` { \"status\": [ { object (/streetview/publish/reference/rest/v1/Status) } ] } ``` |\n\n| Fields ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `status[]` | `object (`[Status](/streetview/publish/reference/rest/v1/Status)`)` The status for the operation to delete a single [Photo](/streetview/publish/reference/rest/v1/photo#Photo) in the batch request. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]