Method: photo.update
ポーズ、場所の関連付け、結合など、Photo
のメタデータを更新します。写真のピクセルの変更はサポートされていません。
updateMask
フィールドに指定されたフィールドのみが使用されます。updateMask
が存在しない場合、すべてのフィールドに更新が適用されます。
このメソッドは、次のエラーコードを返します。
HTTP リクエスト
PUT https://streetviewpublish.googleapis.com/v1/photo/{photo.photoId.id}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
photo.photoId.id |
string
写真の一意の識別子。
|
クエリ パラメータ
パラメータ |
updateMask |
string (FieldMask format)
必須。更新する写真メタデータのフィールドを識別するマスク。存在しない場合、このリクエストでは古い Photo メタデータが新しい Photo メタデータに完全に置き換えられます。無効なフィールドを指定すると更新が失敗します。カンマ区切りリストで複数のフィールドを指定できます。 有効なフィールドは次のとおりです。
pose.heading
pose.lat_lng_pair
pose.pitch
pose.roll
pose.level
pose.altitude
connections
places
注: updateMask に繰り返しフィールドが含まれている場合、繰り返し値のセット全体が新しい内容に置き換えられます。たとえば、updateMask に connections が含まれ、UpdatePhotoRequest.photo.connections が空の場合、すべての接続が削除されます。
|
リクエスト本文
リクエストの本文には Photo
のインスタンスが含まれています。
レスポンスの本文
成功した場合、レスポンスの本文には Photo
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/streetviewpublish
詳細については、OAuth 2.0 の概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-01 UTC。
[null,null,["最終更新日 2023-12-01 UTC。"],[[["Updates a Photo's metadata, such as pose, connections, and places, but not the image pixels themselves."],["Uses an `updateMask` to specify which fields to update; if omitted, all fields are updated."],["Requires the `https://www.googleapis.com/auth/streetviewpublish` OAuth scope for authorization."],["Returns the updated Photo object if successful."],["May return errors if permissions are lacking, the request is invalid, the Photo doesn't exist, or is still being indexed."]]],["This describes how to update a photo's metadata using the Street View Publish API. It uses a `PUT` request to a specific URL with a photo ID in the path. The `updateMask` query parameter specifies which metadata fields to modify. The request body contains the new metadata, and the response body returns the updated photo. Key metadata includes pose, connections, and places. Authorization requires a specific OAuth scope. Possible errors include permission, invalid argument, not found, or unavailability.\n"]]