Package google.streetview.publish.v1

Index

StreetViewPublishService

Publishes and connects user-contributed photos on Street View.

BatchDeletePhotos

rpc BatchDeletePhotos(BatchDeletePhotosRequest) returns (BatchDeletePhotosResponse)

Deletes a list of Photos and their metadata.

Note that if BatchDeletePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchDeletePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchDeletePhotosResponse.results. See DeletePhoto for specific failures that can occur per photo.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

BatchGetPhotos

rpc BatchGetPhotos(BatchGetPhotosRequest) returns (BatchGetPhotosResponse)

Gets the metadata of the specified Photo batch.

Note that if BatchGetPhotos fails, either critical fields are missing or there is an authentication error. Even if BatchGetPhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for specific failures that can occur per photo.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

BatchUpdatePhotos

rpc BatchUpdatePhotos(BatchUpdatePhotosRequest) returns (BatchUpdatePhotosResponse)

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.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

CreatePhoto

rpc CreatePhoto(CreatePhotoRequest) returns (Photo)

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

Currently, the only way to set heading, pitch, and roll in CreatePhoto is through the Photo Sphere XMP metadata in the photo bytes. CreatePhoto ignores the pose.heading, pose.pitch, pose.roll, pose.altitude, and pose.level fields in Pose.

This method returns the following error codes:

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

DeletePhoto

rpc DeletePhoto(DeletePhotoRequest) returns (Empty)

Deletes a Photo and its metadata.

This method returns the following error codes:

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

GetPhoto

rpc GetPhoto(GetPhotoRequest) returns (Photo)

Gets the metadata of the specified Photo.

This method returns the following error codes:

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

ListPhotos

rpc ListPhotos(ListPhotosRequest) returns (ListPhotosResponse)

Lists all the Photos that belong to the user.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

StartUpload

rpc StartUpload(Empty) returns (UploadRef)

Creates an upload session to start uploading photo bytes. The method uses the upload URL of the returned UploadRef to upload the bytes for the Photo.

In addition to the photo requirements shown in https://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, the photo must meet the following requirements:

After the upload completes, the method uses UploadRef with CreatePhoto to create the Photo object entry.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

UpdatePhoto

rpc UpdatePhoto(UpdatePhotoRequest) returns (Photo)

Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the pixels of a photo is not supported.

Only the fields specified in the updateMask field are used. If updateMask is not present, the update applies to all fields.

This method returns the following error codes:

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

BatchDeletePhotosRequest

Request to delete multiple Photos.

Fields
photo_ids[]

string

Required. IDs of the Photos. HTTP GET requests require the following syntax for the URL query parameter: photoIds=<id1>&photoIds=<id2>&....

BatchDeletePhotosResponse

Response to batch delete of one or more Photos.

Fields
status[]

Status

The status for the operation to delete a single Photo in the batch request.

BatchGetPhotosRequest

Request to get one or more Photos. By default

  • does not return the download URL for the photo bytes.

Parameters:

  • view controls if the download URL for the photo bytes is returned.
Fields
photo_ids[]

string

Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be photoIds=<id1>&photoIds=<id2>&....

view

PhotoView

Specifies if a download URL for the photo bytes should be returned in the Photo response.

language_code

string

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.

BatchGetPhotosResponse

Response to batch get of Photos.

Fields
results[]

PhotoResponse

List of results for each individual Photo requested, in the same order as the requests in BatchGetPhotos.

BatchUpdatePhotosRequest

Request to update the metadata of photos. Updating the pixels of photos is not supported.

Fields
update_photo_requests[]

UpdatePhotoRequest

Required. List of UpdatePhotoRequests.

BatchUpdatePhotosResponse

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

Fields
results[]

PhotoResponse

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

Connection

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

Fields
target

PhotoId

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

CreatePhotoRequest

Request to create a Photo.

Fields
photo

Photo

Required. Photo to create.

DeletePhotoRequest

Request to delete a Photo.

Fields
photo_id

string

Required. ID of the Photo.

GetPhotoRequest

Request to get a Photo.

By default

  • does not return the download URL for the photo bytes.

Parameters:

  • view controls if the download URL for the photo bytes is returned.
Fields
photo_id

string

Required. ID of the Photo.

view

PhotoView

Specifies if a download URL for the photo bytes should be returned in the Photo response.

language_code

string

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.

Level

Level information containing level number and its corresponding name.

Fields
number

double

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.

ListPhotosRequest

Request to list all photos that belong to the user sending the request.

By default

  • does not return the download URL for the photo bytes.

Parameters:

  • view controls if the download URL for the photo bytes is returned.
  • pageSize determines the maximum number of photos to return.
  • pageToken is the next page token value returned from a previous ListPhotos request, if any.
  • filter allows filtering by a given parameter. 'placeId' is the only parameter supported at the moment.
Fields
view

PhotoView

Specifies if a download URL for the photos bytes should be returned in the Photos response.

page_size

int32

The maximum number of photos to return. pageSize must be non-negative. If pageSize is zero or is not provided, the default page size of 100 is used. The number of photos returned in the response may be less than pageSize if the number of photos that belong to the user is less than pageSize.

page_token

string

The nextPageToken value returned from a previous ListPhotos request, if any.

filter

string

The filter expression. For example: placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw.

The only filter supported at the moment is placeId.

language_code

string

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.

ListPhotosResponse

Response to list all photos that belong to a user.

Fields
photos[]

Photo

List of photos. The pageSize field in the request determines the number of items returned.

next_page_token

string

Token to retrieve the next page of results, or empty if there are no more results in the list.

Photo

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

Fields
photo_id

PhotoId

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

upload_reference

UploadRef

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

download_url

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.

thumbnail_url

string

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

pose

Pose

Pose of the photo.

connections[]

Connection

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

capture_time

Timestamp

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.

places[]

Place

Places where this photo belongs.

view_count

int64

Output only. View count of the photo.

transfer_status

TransferStatus

Output only. Status of rights transfer on this photo.

maps_publish_status

MapsPublishStatus

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

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.

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.

PhotoId

Identifier for a Photo.

Fields
id

string

Required. A unique identifier for a photo.

PhotoResponse

Response payload for a single Photo in batch operations including BatchGetPhotos and BatchUpdatePhotos.

Fields
status

Status

The status for the operation to get or update a single photo in the batch request.

photo

Photo

The Photo resource, if the request was successful.

PhotoView

Specifies which view of the Photo to include in the response.

Enums
BASIC Server reponses do not include the download URL for the photo bytes. The default value.
INCLUDE_DOWNLOAD_URL Server responses include the download URL for the photo bytes.

Place

Place metadata for an entity.

Fields
place_id

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 language_code.

language_code

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.

Pose

Raw pose measurement for an entity.

Fields
lat_lng_pair

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

double

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

heading

double

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

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.

roll

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 (the floor in a building) used to configure vertical navigation.

accuracy_meters

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.

UpdatePhotoRequest

Request to update the metadata of a Photo. Updating the pixels of a photo is not supported.

Fields
photo

Photo

Required. Photo object containing the new metadata.

update_mask

FieldMask

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

UploadRef

Upload reference for media files.

Fields
upload_url

string

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