Method: photos.batchUpdate

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.

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 (Photo)
      },
      "updateMask": string
    }
  ]
}
Fields
updatePhotoRequests[]

object

Required. List of UpdatePhotoRequests.

updatePhotoRequests[].photo

object (Photo)

Required. Photo object containing the new metadata.

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.latLngPair
  • pose.pitch
  • pose.roll
  • pose.level
  • pose.altitude
  • connections
  • places

Response body

If successful, the response body contains data with the following structure:

Response to batch update of metadata of one or more Photos.

JSON representation
{
  "results": [
    {
      object (PhotoResponse)
    }
  ]
}
Fields
results[]

object (PhotoResponse)

List of results for each individual Photo updated, in the same order as the request.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/streetviewpublish

For more information, see the OAuth 2.0 Overview.

Try it!