Method: photos.batchDelete
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำขอ HTTP
POST https://streetviewpublish.googleapis.com/v1/photos:batchDelete
URL ใช้ไวยากรณ์การแปลง gRPC
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"photoIds": [
string
]
} |
ช่อง |
photoIds[] |
string
ต้องระบุ รหัสของ Photos คำขอ HTTP GET ต้องใช้ไวยากรณ์ต่อไปนี้สำหรับพารามิเตอร์การค้นหาของ URL: photoIds=<id1>&photoIds=<id2>&...
|
เนื้อหาการตอบกลับ
ตอบสนองต่อการลบเป็นกลุ่มของ Photos
อย่างน้อย 1 รายการ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"status": [
{
object (Status )
}
]
} |
ช่อง |
status[] |
object (Status )
สถานะสำหรับการดำเนินการลบ Photo รายการเดียวในคำขอแบบกลุ่ม
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/streetviewpublish
สำหรับข้อมูลเพิ่มเติม โปรดดูที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\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)."]]