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 總覽。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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)."]]