Method: photos.batchUpdate
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Photos
का मेटाडेटा अपडेट करता है, जैसे पोज़, जगह की जानकारी, कनेक्शन वगैरह. फ़ोटो के पिक्सल बदलने की सुविधा काम नहीं करती.
ध्यान दें कि अगर photos.batchUpdate
कोड जनरेट नहीं होता है, तो या तो ज़रूरी फ़ील्ड मौजूद नहीं हैं या पुष्टि करने में कोई गड़बड़ी हुई है. photos.batchUpdate
के सफल होने पर भी, हो सकता है कि बैच में मौजूद अलग-अलग फ़ोटो काम न करें. इन गड़बड़ियों की जानकारी, BatchUpdatePhotosResponse.results
के हर PhotoResponse.status
में दी गई है. हर फ़ोटो के साथ होने वाली खास गड़बड़ियों के बारे में जानने के लिए, photo.update
पर जाएं.
सिर्फ़ updateMask
फ़ील्ड में दिए गए फ़ील्ड का इस्तेमाल किया जाता है. अगर updateMask
मौजूद नहीं है, तो यह अपडेट सभी फ़ील्ड पर लागू होता है.
BatchUpdatePhotosRequest
में UpdatePhotoRequest
मैसेज की संख्या 20 से ज़्यादा नहीं होनी चाहिए.
ध्यान दें: Pose.altitude
को अपडेट करने के लिए, Pose.latLngPair
को भी भरना होगा. ऐसा न करने पर, अनुरोध स्वीकार नहीं किया जाएगा.
एचटीटीपी अनुरोध
POST https://streetviewpublish.googleapis.com/v1/photos:batchUpdate
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में, यहां दिए गए स्ट्रक्चर का डेटा शामिल होता है:
JSON के काेड में दिखाना |
{
"updatePhotoRequests": [
{
"photo": {
object (Photo )
},
"updateMask": string
}
]
} |
फ़ील्ड |
updatePhotoRequests[] |
object
ज़रूरी है. UpdatePhotoRequests की सूची.
|
updatePhotoRequests[].photo |
object (Photo )
ज़रूरी है. Photo ऑब्जेक्ट में नया मेटाडेटा है.
|
updatePhotoRequests[].updateMask |
string (FieldMask format)
ज़रूरी है. मास्क जो अपडेट किए जाने वाले फ़ोटो मेटाडेटा पर फ़ील्ड की पहचान करता है. अगर यह मेटाडेटा मौजूद नहीं होता है, तो इस अनुरोध में पुराने Photo मेटाडेटा को नए Photo मेटाडेटा से बदल दिया जाता है. अमान्य फ़ील्ड दिए जाने पर अपडेट नहीं होता. एक से ज़्यादा फ़ील्ड को कॉमा-डीलिमिटेड सूची के तौर पर सेट किया जा सकता है. ये फ़ील्ड मान्य हैं:
pose.heading
pose.lat_lng_pair
pose.pitch
pose.roll
pose.level
pose.altitude
connections
places
ध्यान दें: जब updateMask में दोहराए गए फ़ील्ड होते हैं, तो दोहराए गए मानों का पूरा सेट नई सामग्री से बदल जाता है. उदाहरण के लिए, अगर updateMask में connections है और UpdatePhotoRequest.photo.connections खाली है, तो सभी कनेक्शन हटा दिए जाते हैं.
|
जवाब का मुख्य भाग
एक या ज़्यादा Photos
के मेटाडेटा के बैच अपडेट का जवाब.
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
JSON के काेड में दिखाना |
{
"results": [
{
object (PhotoResponse )
}
]
} |
फ़ील्ड |
results[] |
object (PhotoResponse )
हर Photo के लिए, नतीजों की सूची, अनुरोध के क्रम में अपडेट की गई.
|
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/streetviewpublish
ज़्यादा जानकारी के लिए, OAuth 2.0 की खास जानकारी देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe API updates metadata of photos, such as pose, connections, and place association, but does not change pixel data.\u003c/p\u003e\n"],["\u003cp\u003eRequests are submitted as a batch of up to 20 \u003ccode\u003eUpdatePhotoRequest\u003c/code\u003e messages specifying the photo and fields to update.\u003c/p\u003e\n"],["\u003cp\u003eIf the \u003ccode\u003eupdateMask\u003c/code\u003e is not provided, all fields of the Photo resource will be updated with the values provided in the request.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating \u003ccode\u003ePose.altitude\u003c/code\u003e, \u003ccode\u003ePose.latLngPair\u003c/code\u003e must also be specified, or the request will fail.\u003c/p\u003e\n"],["\u003cp\u003eThis API requires the \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This document details the process of updating photo metadata via the `photos:batchUpdate` method. It outlines that you can update fields like pose, place association, and connections, but not photo pixels. The request involves sending `UpdatePhotoRequests` within a `BatchUpdatePhotosRequest` to `POST https://streetviewpublish.googleapis.com/v1/photos:batchUpdate`. An `updateMask` specifies which fields to modify. The response contains a list of `PhotoResponse` objects, indicating the success or failure of each photo update. A maximum of 20 `UpdatePhotoRequest` messages are allowed.\n"],null,["# Method: photos.batchUpdate\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.BatchUpdatePhotosResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates the metadata of [Photos](/streetview/publish/reference/rest/v1/photo#Photo), such as pose, place association, connections, etc. Changing the pixels of photos is not supported.\n\nNote that if [photos.batchUpdate](/streetview/publish/reference/rest/v1/photos/batchUpdate#google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos) fails, either critical fields are missing or there is an authentication error. Even if [photos.batchUpdate](/streetview/publish/reference/rest/v1/photos/batchUpdate#google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos) 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 [BatchUpdatePhotosResponse.results](/streetview/publish/reference/rest/v1/photos/batchUpdate#body.BatchUpdatePhotosResponse.FIELDS.results). See [photo.update](/streetview/publish/reference/rest/v1/photo/update#google.streetview.publish.v1.StreetViewPublishService.UpdatePhoto) for specific failures that can occur per photo.\n\nOnly the fields specified in `updateMask` field are used. If `updateMask` is not present, the update applies to all fields.\n\nThe number of `UpdatePhotoRequest` messages in a `BatchUpdatePhotosRequest` must not exceed 20.\n\u003e Note: To update [Pose.altitude](/streetview/publish/reference/rest/v1/photo#Pose.FIELDS.altitude), [Pose.latLngPair](/streetview/publish/reference/rest/v1/photo#Pose.FIELDS.lat_lng_pair) has to be filled as well. Otherwise, the request will fail.\n\n### HTTP request\n\n`POST https://streetviewpublish.googleapis.com/v1/photos:batchUpdate`\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| ``` { \"updatePhotoRequests\": [ { \"photo\": { object (/streetview/publish/reference/rest/v1/photo#Photo) }, \"updateMask\": string } ] } ``` |\n\n| Fields ||\n|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updatePhotoRequests[]` | `object` Required. List of `UpdatePhotoRequests`. |\n| `updatePhotoRequests[].photo` | `object (`[Photo](/streetview/publish/reference/rest/v1/photo#Photo)`)` Required. [Photo](/streetview/publish/reference/rest/v1/photo#Photo) object containing the new metadata. |\n| `updatePhotoRequests[].updateMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` Required. Mask that identifies fields on the photo metadata to update. If not present, the old [Photo](/streetview/publish/reference/rest/v1/photo#Photo) metadata is entirely replaced with the new [Photo](/streetview/publish/reference/rest/v1/photo#Photo) metadata in this request. The update fails if invalid fields are specified. Multiple fields can be specified in a comma-delimited list. The following fields are valid: - `pose.heading` - `pose.lat_lng_pair` - `pose.pitch` - `pose.roll` - `pose.level` - `pose.altitude` - `connections` - `places` \u003e Note: When `updateMask` contains repeated fields, the entire set of repeated values get replaced with the new contents. For example, if `updateMask` contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all connections are removed. |\n\n### Response body\n\nResponse to batch update of metadata 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| ``` { \"results\": [ { object (/streetview/publish/reference/rest/v1/PhotoResponse) } ] } ``` |\n\n| Fields ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `results[]` | `object (`[PhotoResponse](/streetview/publish/reference/rest/v1/PhotoResponse)`)` List of results for each individual [Photo](/streetview/publish/reference/rest/v1/photo#Photo) updated, in the same order as the 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)."]]