Page Summary
-
The API updates metadata of photos, such as pose, connections, and place association, but does not change pixel data.
-
Requests are submitted as a batch of up to 20
UpdatePhotoRequestmessages specifying the photo and fields to update. -
If the
updateMaskis not provided, all fields of the Photo resource will be updated with the values provided in the request. -
When updating
Pose.altitude,Pose.latLngPairmust also be specified, or the request will fail. -
This API requires the
https://www.googleapis.com/auth/streetviewpublishOAuth scope for authorization.
Updates the metadata of Photos
, such as pose, place association, connections, etc. Changing the pixels of photos is not supported.
Note that if photos.batchUpdate
fails, either critical fields are missing or there is an authentication error. Even if photos.batchUpdate
succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status
in BatchUpdatePhotosResponse.results
. See photo.update
for specific failures that can occur per photo.
Only the fields specified in updateMask
field are used. If updateMask
is not present, the update applies to all fields.
The number of UpdatePhotoRequest
messages in a BatchUpdatePhotosRequest
must not exceed 20.
Note: To update
Pose.altitude,Pose.latLngPairhas to be filled as well. Otherwise, the request will fail.
HTTP request
POST https://streetviewpublish.googleapis.com/v1/photos:batchUpdate
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"updatePhotoRequests"
:
[
{
"photo"
:
{
object (
|
updatePhotoRequests[]
object
Required. List of UpdatePhotoRequests
.
updatePhotoRequests[].updateMask
string (
FieldMask
format)
Required. Mask that identifies fields on the photo metadata to update. If not present, the old Photo
metadata is entirely replaced with the new 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
Note: When
updateMaskcontains repeated fields, the entire set of repeated values get replaced with the new contents. For example, ifupdateMaskcontainsconnectionsandUpdatePhotoRequest.photo.connectionsis empty, all connections are removed.
Response body
Response to batch update of metadata of one or more Photos
.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"results"
:
[
{
object (
|
| Fields | |
|---|---|
results[]
|
List of results for each individual |
Authorization scopes
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/streetviewpublish
For more information, see the OAuth 2.0 Overview .


