REST Resource: photo

Resource: Photo

Photo is used to store 360 photos along with photo metadata.

JSON representation
{
  "photoId": {
    object (PhotoId)
  },
  "uploadReference": {
    object (UploadRef)
  },
  "downloadUrl": string,
  "thumbnailUrl": string,
  "shareLink": string,
  "pose": {
    object (Pose)
  },
  "connections": [
    {
      object (Connection)
    }
  ],
  "captureTime": string,
  "uploadTime": string,
  "places": [
    {
      object (Place)
    }
  ],
  "viewCount": string,
  "transferStatus": enum (TransferStatus),
  "mapsPublishStatus": enum (MapsPublishStatus)
}
Fields
photoId

object (PhotoId)

Required. Output only. Required when updating a photo. Output only when creating a photo. Identifier for the photo, which is unique among all photos in Google.

uploadReference

object (UploadRef)

Input only. Required when creating a photo. Input only. The resource URL where the photo bytes are uploaded to.

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.

thumbnailUrl

string

Output only. The thumbnail URL for showing a preview of the given photo.

pose

object (Pose)

Optional. Pose of the photo.

connections[]

object (Connection)

Optional. Connections to other photos. A connection represents the link from this photo to another photo.

captureTime

string (Timestamp format)

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.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

uploadTime

string (Timestamp format)

Output only. Time when the image was uploaded.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

places[]

object (Place)

Optional. Places where this photo belongs.

viewCount

string (int64 format)

Output only. View count of the photo.

transferStatus

enum (TransferStatus)

Output only. Status of rights transfer on this photo.

mapsPublishStatus

enum (MapsPublishStatus)

Output only. Status in Google Maps, whether this photo was published or rejected.

PhotoId

Identifier for a Photo.

JSON representation
{
  "id": string
}
Fields
id

string

A unique identifier for a photo.

UploadRef

Upload reference for media files.

JSON representation
{

  // Union field file_source can be only one of the following:
  "uploadUrl": string
  // End of list of possible types for union field file_source.
}
Fields
Union field file_source. Required. file_source can be only one of the following:
uploadUrl

string

An upload reference should be unique for each user. It follows the form: "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{uploadReference}"

Pose

Raw pose measurement for an entity.

JSON representation
{
  "latLngPair": {
    object (LatLng)
  },
  "altitude": number,
  "heading": number,
  "pitch": number,
  "roll": number,
  "gpsRecordTimestampUnixEpoch": string,
  "level": {
    object (Level)
  },
  "accuracyMeters": number
}
Fields
latLngPair

object (LatLng)

Latitude and longitude pair of the pose, as explained here: https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng When creating a Photo, if the latitude and longitude pair are not provided, the geolocation from the exif header is used. A latitude and longitude pair not provided in the photo or exif header causes the photo process to fail.

altitude

number

Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity.

heading

number

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

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.

roll

number

Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.

gpsRecordTimestampUnixEpoch

string (Timestamp format)

Time of the GPS record since UTC epoch.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

level

object (Level)

Level (the floor in a building) used to configure vertical navigation.

accuracyMeters

number

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.

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.

JSON representation
{
  "latitude": number,
  "longitude": number
}
Fields
latitude

number

The latitude in degrees. It must be in the range [-90.0, +90.0].

longitude

number

The longitude in degrees. It must be in the range [-180.0, +180.0].

Level

Level information containing level number and its corresponding name.

JSON representation
{
  "number": number,
  "name": string
}
Fields
number

number

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.

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.

Connection

A connection is the link from a source photo to a destination photo.

JSON representation
{
  "target": {
    object (PhotoId)
  }
}
Fields
target

object (PhotoId)

Required. The destination of the connection from the containing photo to another photo.

Place

Place metadata for an entity.

JSON representation
{
  "placeId": string,
  "name": string,
  "languageCode": string
}
Fields
placeId

string

Place identifier, as described in https://developers.google.com/places/place-id.

name

string

Output only. The name of the place, localized to the languageCode.

languageCode

string

Output only. The languageCode that the name is localized with. This should be the languageCode specified in the request, but may be a fallback.

TransferStatus

Status of rights transfer.

Enums
TRANSFER_STATUS_UNKNOWN The status of this transfer is unspecified.
NEVER_TRANSFERRED This photo has never been in a transfer.
PENDING This photo transfer has been initiated, but the receiver has not yet responded.
COMPLETED The photo transfer has been completed, and this photo has been transferred to the recipient.
REJECTED The recipient rejected this photo transfer.
EXPIRED The photo transfer expired before the recipient took any action.
CANCELLED The sender cancelled this photo transfer.
RECEIVED_VIA_TRANSFER The recipient owns this photo due to a rights transfer.

MapsPublishStatus

Publication status of the photo in Google Maps.

Enums
UNSPECIFIED_MAPS_PUBLISH_STATUS The status of the photo is unknown.
PUBLISHED The photo is published to the public through Google Maps.
REJECTED_UNKNOWN The photo has been rejected for an unknown reason.

Methods

create

After the client finishes uploading the photo with the returned UploadRef, CreatePhoto publishes the uploaded Photo to Street View on Google Maps.

delete

Deletes a Photo and its metadata.

get

Gets the metadata of the specified Photo.

startUpload

Creates an upload session to start uploading photo bytes.

update

Updates the metadata of a Photo, such as pose, place association, connections, etc.