---
title: "POST /v1/photos:batchUpdate"
method: POST
path: "/v1/photos:batchUpdate"
tags: ["photos"]
---

# POST /v1/photos:batchUpdate

`POST /v1/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 BatchUpdatePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto 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.latLngPair has to be filled as well. Otherwise, the request will fail.

## Request body

- BatchUpdatePhotosRequest — Request to update the metadata of photos. Updating the pixels of photos is not supported.
  - `updatePhotoRequests` UpdatePhotoRequest[] — Required. List of UpdatePhotoRequests.
    - `photo` Photo — Photo is used to store 360 photos along with photo metadata.
      - `connections` Connection[] — Optional. Connections to other photos. A connection represents the link from this photo to another photo.
        - `target` PhotoId — Identifier for a Photo.
          - `id` string — A unique identifier for a photo.
      - `transferStatus` 'TRANSFER_STATUS_UNKNOWN' | 'NEVER_TRANSFERRED' | 'PENDING' | 'COMPLETED' | 'REJECTED' | 'EXPIRED' | 'CANCELLED' | 'RECEIVED_VIA_TRANSFER' — Output only. Status of rights transfer on this photo.
      - `mapsPublishStatus` 'UNSPECIFIED_MAPS_PUBLISH_STATUS' | 'PUBLISHED' | 'REJECTED_UNKNOWN' — Output only. Status in Google Maps, whether this photo was published or rejected.
      - `shareLink` string — Output only. The share link for the photo.
      - `thumbnailUrl` string — Output only. The thumbnail URL for showing a preview of the given photo.
      - `viewCount` string, int64 — Output only. View count of the photo.
      - `places` Place[] — Optional. Places where this photo belongs.
        - `placeId` string — Place identifier, as described in https://developers.google.com/places/place-id.
        - `languageCode` string — Output only. The language_code that the name is localized with. This should be the language_code specified in the request, but may be a fallback.
        - `name` string — Output only. The name of the place, localized to the language_code.
      - `captureTime` string, google-datetime — Optional. Absolute time when the photo was captured. When the photo has no exif timestamp, this is used to set a timestamp in the photo metadata.
      - `pose` Pose — Raw pose measurement for an entity.
        - `latLngPair` LatLng — An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
          - `latitude` number, double — The latitude in degrees. It must be in the range [-90.0, +90.0].
          - `longitude` number, double — The longitude in degrees. It must be in the range [-180.0, +180.0].
        - `altitude` number, double — Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity.
        - `roll` number, double — Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.
        - `level` Level — Level information containing level number and its corresponding name.
          - `name` string — Required. A name assigned to this Level, restricted to 3 characters. Consider how the elevator buttons would be labeled for this level if there was an elevator.
          - `number` number, double — Optional. Floor number, used for ordering. 0 indicates the ground level, 1 indicates the first level above ground level, -1 indicates the first level under ground level. Non-integer values are OK.
        - `gpsRecordTimestampUnixEpoch` string, google-datetime — Time of the GPS record since UTC epoch.
        - `accuracyMeters` number, float — The estimated horizontal accuracy of this pose in meters with 68% confidence (one standard deviation). For example, on Android, this value is available from this method: https://developer.android.com/reference/android/location/Location#getAccuracy(). Other platforms have different methods of obtaining similar accuracy estimations.
        - `heading` number, double — The following pose parameters pertain to the center of the photo. They match https://developers.google.com/streetview/spherical-metadata. Compass heading, measured at the center of the photo in degrees clockwise from North. Value must be >=0 and <360. NaN indicates an unmeasured quantity.
        - `pitch` number, double — Pitch, measured at the center of the photo in degrees. Value must be >=-90 and <= 90. A value of -90 means looking directly down, and a value of 90 means looking directly up. NaN indicates an unmeasured quantity.
      - `downloadUrl` string — Output only. The download URL for the photo bytes. This field is set only when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.
      - `photoId` PhotoId — Identifier for a Photo.
        - `id` string — A unique identifier for a photo.
      - `uploadReference` UploadRef — Upload reference for media files.
        - `uploadUrl` string — An upload reference should be unique for each user. It follows the form: "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
      - `uploadTime` string, google-datetime — Output only. Time when the image was uploaded.
    - `updateMask` string, google-fieldmask — 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 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.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/streetviewpublish.md) · [All operations](https://skmtc.net/google/apis/streetviewpublish/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/streetviewpublish/revisions/be96449e6f98/schema)
