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,
  "places": [
    {
      object(Place)
    }
  ],
  "viewCount": string,
  "transferStatus": enum(TransferStatus),
  "mapsPublishStatus": enum(MapsPublishStatus)
}
Fields
photoId

object(PhotoId)

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)

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)

Pose of the photo.

connections[]

object(Connection)

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

captureTime

string (Timestamp format)

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, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

places[]

object(Place)

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

Required. A unique identifier for a photo.

UploadRef

Upload reference for media files.

JSON representation
{
  "uploadUrl": string
}
Fields
uploadUrl

string

Required. 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,
  "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

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.

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 representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this 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

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.