Skip to main content
Glama

Street View Publish API MCP Server

models.py21.9 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T02:59:41+00:00 from __future__ import annotations from enum import Enum from typing import Any, Dict, List, Optional from pydantic import BaseModel, Field, RootModel class BatchDeletePhotosRequest(BaseModel): photoIds: Optional[List[str]] = Field( None, description='Required. IDs of the Photos. HTTP GET requests require the following syntax for the URL query parameter: `photoIds=&photoIds=&...`.', ) class Empty(BaseModel): pass class GpsDataGapFailureDetails(BaseModel): gapDuration: Optional[str] = Field( None, description='The duration of the gap in GPS data that was found.' ) gapStartTime: Optional[str] = Field( None, description='Relative time (from the start of the video stream) when the gap started.', ) class ImuDataGapFailureDetails(BaseModel): gapDuration: Optional[str] = Field( None, description='The duration of the gap in IMU data that was found.' ) gapStartTime: Optional[str] = Field( None, description='Relative time (from the start of the video stream) when the gap started.', ) class InsufficientGpsFailureDetails(BaseModel): gpsPointsFound: Optional[int] = Field( None, description='The number of GPS points that were found in the video.' ) class LatLng(BaseModel): latitude: Optional[float] = Field( None, description='The latitude in degrees. It must be in the range [-90.0, +90.0].', ) longitude: Optional[float] = Field( None, description='The longitude in degrees. It must be in the range [-180.0, +180.0].', ) class LatLngBounds(BaseModel): northeast: Optional[LatLng] = Field( None, description='The northeast corner of these bounds.' ) southwest: Optional[LatLng] = Field( None, description='The southwest corner of these bounds.' ) class Level(BaseModel): name: Optional[str] = Field( None, description='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: Optional[float] = Field( None, description='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.', ) class Measurement3d(BaseModel): captureTime: Optional[str] = Field( None, description='The timestamp of the IMU measurement.' ) x: Optional[float] = Field( None, description='The sensor measurement in the x axis.' ) y: Optional[float] = Field( None, description='The sensor measurement in the y axis.' ) z: Optional[float] = Field( None, description='The sensor measurement in the z axis.' ) class NoOverlapGpsFailureDetails(BaseModel): gpsEndTime: Optional[str] = Field( None, description='Time of last recorded GPS point.' ) gpsStartTime: Optional[str] = Field( None, description='Time of first recorded GPS point.' ) videoEndTime: Optional[str] = Field(None, description='End time of video.') videoStartTime: Optional[str] = Field(None, description='Start time of video.') class NotOutdoorsFailureDetails(BaseModel): startTime: Optional[str] = Field( None, description='Relative time (from the start of the video stream) when an indoor frame was found.', ) class MapsPublishStatus(Enum): UNSPECIFIED_MAPS_PUBLISH_STATUS = 'UNSPECIFIED_MAPS_PUBLISH_STATUS' PUBLISHED = 'PUBLISHED' REJECTED_UNKNOWN = 'REJECTED_UNKNOWN' class TransferStatus(Enum): TRANSFER_STATUS_UNKNOWN = 'TRANSFER_STATUS_UNKNOWN' NEVER_TRANSFERRED = 'NEVER_TRANSFERRED' PENDING = 'PENDING' COMPLETED = 'COMPLETED' REJECTED = 'REJECTED' EXPIRED = 'EXPIRED' CANCELLED = 'CANCELLED' RECEIVED_VIA_TRANSFER = 'RECEIVED_VIA_TRANSFER' class PhotoId(BaseModel): id: Optional[str] = Field(None, description='A unique identifier for a photo.') class FailureReason(Enum): PROCESSING_FAILURE_REASON_UNSPECIFIED = 'PROCESSING_FAILURE_REASON_UNSPECIFIED' LOW_RESOLUTION = 'LOW_RESOLUTION' DUPLICATE = 'DUPLICATE' INSUFFICIENT_GPS = 'INSUFFICIENT_GPS' NO_OVERLAP_GPS = 'NO_OVERLAP_GPS' INVALID_GPS = 'INVALID_GPS' FAILED_TO_REFINE_POSITIONS = 'FAILED_TO_REFINE_POSITIONS' TAKEDOWN = 'TAKEDOWN' CORRUPT_VIDEO = 'CORRUPT_VIDEO' INTERNAL = 'INTERNAL' INVALID_VIDEO_FORMAT = 'INVALID_VIDEO_FORMAT' INVALID_VIDEO_DIMENSIONS = 'INVALID_VIDEO_DIMENSIONS' INVALID_CAPTURE_TIME = 'INVALID_CAPTURE_TIME' GPS_DATA_GAP = 'GPS_DATA_GAP' JUMPY_GPS = 'JUMPY_GPS' INVALID_IMU = 'INVALID_IMU' INSUFFICIENT_IMU = 'INSUFFICIENT_IMU' INSUFFICIENT_OVERLAP_TIME_SERIES = 'INSUFFICIENT_OVERLAP_TIME_SERIES' IMU_DATA_GAP = 'IMU_DATA_GAP' UNSUPPORTED_CAMERA = 'UNSUPPORTED_CAMERA' NOT_OUTDOORS = 'NOT_OUTDOORS' INSUFFICIENT_VIDEO_FRAMES = 'INSUFFICIENT_VIDEO_FRAMES' INSUFFICIENT_MOVEMENT = 'INSUFFICIENT_MOVEMENT' class GpsSource(Enum): PHOTO_SEQUENCE = 'PHOTO_SEQUENCE' CAMERA_MOTION_METADATA_TRACK = 'CAMERA_MOTION_METADATA_TRACK' class ProcessingState(Enum): PROCESSING_STATE_UNSPECIFIED = 'PROCESSING_STATE_UNSPECIFIED' PENDING = 'PENDING' PROCESSING = 'PROCESSING' PROCESSED = 'PROCESSED' FAILED = 'FAILED' class Place(BaseModel): languageCode: Optional[str] = Field( None, description='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: Optional[str] = Field( None, description='Output only. The name of the place, localized to the language_code.', ) placeId: Optional[str] = Field( None, description='Place identifier, as described in https://developers.google.com/places/place-id.', ) class Pose(BaseModel): accuracyMeters: Optional[float] = Field( None, description='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.', ) altitude: Optional[float] = Field( None, description='Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity.', ) gpsRecordTimestampUnixEpoch: Optional[str] = Field( None, description='Time of the GPS record since UTC epoch.' ) heading: Optional[float] = Field( None, description='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.', ) latLngPair: Optional[LatLng] = Field( None, description='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.', ) level: Optional[Level] = Field( None, description='Level (the floor in a building) used to configure vertical navigation.', ) pitch: Optional[float] = Field( None, description='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: Optional[float] = Field( None, description='Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.', ) class ProcessingFailureDetails(BaseModel): gpsDataGapDetails: Optional[GpsDataGapFailureDetails] = Field( None, description='See GpsDataGapFailureDetails.' ) imuDataGapDetails: Optional[ImuDataGapFailureDetails] = Field( None, description='See ImuDataGapFailureDetails.' ) insufficientGpsDetails: Optional[InsufficientGpsFailureDetails] = Field( None, description='See InsufficientGpsFailureDetails.' ) noOverlapGpsDetails: Optional[NoOverlapGpsFailureDetails] = Field( None, description='See NoOverlapGpsFailureDetails.' ) notOutdoorsDetails: Optional[NotOutdoorsFailureDetails] = Field( None, description='See NotOutdoorsFailureDetails.' ) class Status(BaseModel): code: Optional[int] = Field( None, description='The status code, which should be an enum value of google.rpc.Code.', ) details: Optional[List[Dict[str, Any]]] = Field( None, description='A list of messages that carry the error details. There is a common set of message types for APIs to use.', ) message: Optional[str] = Field( None, description='A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.', ) class UploadRef(BaseModel): uploadUrl: Optional[str] = Field( None, description='An upload reference should be unique for each user. It follows the form: "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"', ) class FieldXgafv(Enum): field_1 = '1' field_2 = '2' class Alt(Enum): json = 'json' media = 'media' proto = 'proto' class View(Enum): BASIC = 'BASIC' INCLUDE_DOWNLOAD_URL = 'INCLUDE_DOWNLOAD_URL' class InputType(Enum): INPUT_TYPE_UNSPECIFIED = 'INPUT_TYPE_UNSPECIFIED' VIDEO = 'VIDEO' XDM = 'XDM' class PhotoIds(RootModel[List[str]]): root: List[str] class BatchDeletePhotosResponse(BaseModel): status: Optional[List[Status]] = Field( None, description='The status for the operation to delete a single Photo in the batch request.', ) class Connection(BaseModel): target: Optional[PhotoId] = Field( None, description='Required. The destination of the connection from the containing photo to another photo.', ) class Imu(BaseModel): accelMpsps: Optional[List[Measurement3d]] = Field( None, description='The accelerometer measurements in meters/sec^2 with increasing timestamps from devices.', ) gyroRps: Optional[List[Measurement3d]] = Field( None, description='The gyroscope measurements in radians/sec with increasing timestamps from devices.', ) magUt: Optional[List[Measurement3d]] = Field( None, description='The magnetometer measurements of the magnetic field in microtesla (uT) with increasing timestamps from devices.', ) class Operation(BaseModel): done: Optional[bool] = Field( None, description='If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.', ) error: Optional[Status] = Field( None, description='The error result of the operation in case of failure or cancellation.', ) metadata: Optional[Dict[str, Any]] = Field( None, description='Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.', ) name: Optional[str] = Field( None, description='The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.', ) response: Optional[Dict[str, Any]] = Field( None, description='The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.', ) class Photo(BaseModel): captureTime: Optional[str] = Field( None, description='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.', ) connections: Optional[List[Connection]] = Field( None, description='Optional. Connections to other photos. A connection represents the link from this photo to another photo.', ) downloadUrl: Optional[str] = Field( None, description='Output only. The download URL for the photo bytes. This field is set only when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.', ) mapsPublishStatus: Optional[MapsPublishStatus] = Field( None, description='Output only. Status in Google Maps, whether this photo was published or rejected.', ) photoId: Optional[PhotoId] = Field( None, description='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.', ) places: Optional[List[Place]] = Field( None, description='Optional. Places where this photo belongs.' ) pose: Optional[Pose] = Field(None, description='Optional. Pose of the photo.') shareLink: Optional[str] = Field( None, description='Output only. The share link for the photo.' ) thumbnailUrl: Optional[str] = Field( None, description='Output only. The thumbnail URL for showing a preview of the given photo.', ) transferStatus: Optional[TransferStatus] = Field( None, description='Output only. Status of rights transfer on this photo.' ) uploadReference: Optional[UploadRef] = Field( None, description='Input only. Required when creating a photo. Input only. The resource URL where the photo bytes are uploaded to.', ) uploadTime: Optional[str] = Field( None, description='Output only. Time when the image was uploaded.' ) viewCount: Optional[str] = Field( None, description='Output only. View count of the photo.' ) class PhotoResponse(BaseModel): photo: Optional[Photo] = Field( None, description='The Photo resource, if the request was successful.' ) status: Optional[Status] = Field( None, description='The status for the operation to get or update a single photo in the batch request.', ) class PhotoSequence(BaseModel): captureTimeOverride: Optional[str] = Field( None, description='Optional. Absolute time when the photo sequence starts to be captured. If the photo sequence is a video, this is the start time of the video. If this field is populated in input, it overrides the capture time in the video or XDM file.', ) distanceMeters: Optional[float] = Field( None, description='Output only. The computed distance of the photo sequence in meters.', ) failureDetails: Optional[ProcessingFailureDetails] = Field( None, description='Output only. If this sequence has `failure_reason` set, this may contain additional details about the failure.', ) failureReason: Optional[FailureReason] = Field( None, description='Output only. If this sequence has processing_state = FAILED, this will contain the reason why it failed. If the processing_state is any other value, this field will be unset.', ) filename: Optional[str] = Field( None, description='Output only. The filename of the upload. Does not include the directory path. Only available if the sequence was uploaded on a platform that provides the filename.', ) gpsSource: Optional[GpsSource] = Field( None, description='Input only. If both raw_gps_timeline and the Camera Motion Metadata Track (CAMM) contain GPS measurements, indicate which takes precedence.', ) id: Optional[str] = Field( None, description='Output only. Unique identifier for the photo sequence. This also acts as a long running operation ID if uploading is performed asynchronously.', ) imu: Optional[Imu] = Field( None, description='Input only. Three axis IMU data for the collection. If this data is too large to put in the request, then it should be put in the CAMM track for the video. This data always takes precedence over the equivalent CAMM data, if it exists.', ) photos: Optional[List[Photo]] = Field( None, description='Output only. Photos with increasing timestamps.' ) processingState: Optional[ProcessingState] = Field( None, description='Output only. The processing state of this sequence.' ) rawGpsTimeline: Optional[List[Pose]] = Field( None, description="Input only. Raw GPS measurements with increasing timestamps from the device that aren't time synced with each photo. These raw measurements will be used to infer the pose of each frame. Required in input when InputType is VIDEO and raw GPS measurements are not in Camera Motion Metadata Track (CAMM). User can indicate which takes precedence using gps_source if raw GPS measurements are provided in both raw_gps_timeline and Camera Motion Metadata Track (CAMM).", ) sequenceBounds: Optional[LatLngBounds] = Field( None, description='Output only. A rectangular box that encapsulates every image in this photo sequence.', ) uploadReference: Optional[UploadRef] = Field( None, description='Input only. Required when creating photo sequence. The resource name where the bytes of the photo sequence (in the form of video) are uploaded.', ) uploadTime: Optional[str] = Field( None, description='Output only. The time this photo sequence was created in uSV Store service.', ) viewCount: Optional[str] = Field( None, description='Output only. The total number of views that all the published images in this PhotoSequence have received.', ) class UpdatePhotoRequest(BaseModel): photo: Optional[Photo] = Field( None, description='Required. Photo object containing the new metadata.' ) updateMask: Optional[str] = Field( None, description='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.', ) class BatchGetPhotosResponse(BaseModel): results: Optional[List[PhotoResponse]] = Field( None, description='List of results for each individual Photo requested, in the same order as the requests in BatchGetPhotos.', ) class BatchUpdatePhotosRequest(BaseModel): updatePhotoRequests: Optional[List[UpdatePhotoRequest]] = Field( None, description='Required. List of UpdatePhotoRequests.' ) class BatchUpdatePhotosResponse(BaseModel): results: Optional[List[PhotoResponse]] = Field( None, description='List of results for each individual Photo updated, in the same order as the request.', ) class ListPhotoSequencesResponse(BaseModel): nextPageToken: Optional[str] = Field( None, description='Token to retrieve the next page of results, or empty if there are no more results in the list.', ) photoSequences: Optional[List[Operation]] = Field( None, description='List of photo sequences via Operation interface. The maximum number of items returned is based on the pageSize field in the request. Each item in the list can have three possible states, * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` contains a PhotoSequence message, In each sequence, only Id is populated.', ) class ListPhotosResponse(BaseModel): nextPageToken: Optional[str] = Field( None, description='Token to retrieve the next page of results, or empty if there are no more results in the list.', ) photos: Optional[List[Photo]] = Field( None, description='List of photos. The pageSize field in the request determines the number of items returned.', )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/street-view-publish-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server