Method: photos.batchUpdate
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
HTTP リクエスト
POST https://streetviewpublish.googleapis.com/v1/photos:batchUpdate
この URL は gRPC Transcoding 構文を使用します。
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"updatePhotoRequests": [
{
"photo": {
object (Photo )
},
"updateMask": string
}
]
} |
フィールド |
updatePhotoRequests[] |
object
必須。UpdatePhotoRequests のリスト。
|
updatePhotoRequests[].photo |
object (Photo )
必須。新しいメタデータを含む Photo オブジェクト。
|
updatePhotoRequests[].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 が空の場合、すべての接続が削除されます。
|
レスポンスの本文
1 つ以上の Photos
のメタデータのバッチ更新に対するレスポンス。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
フィールド |
results[] |
object (PhotoResponse )
個々の Photo の結果のリストを、リクエストと同じ順序で更新しました。
|
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/streetviewpublish
詳しくは、OAuth 2.0 の概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eThe API updates metadata of photos, such as pose, connections, and place association, but does not change pixel data.\u003c/p\u003e\n"],["\u003cp\u003eRequests are submitted as a batch of up to 20 \u003ccode\u003eUpdatePhotoRequest\u003c/code\u003e messages specifying the photo and fields to update.\u003c/p\u003e\n"],["\u003cp\u003eIf the \u003ccode\u003eupdateMask\u003c/code\u003e is not provided, all fields of the Photo resource will be updated with the values provided in the request.\u003c/p\u003e\n"],["\u003cp\u003eWhen updating \u003ccode\u003ePose.altitude\u003c/code\u003e, \u003ccode\u003ePose.latLngPair\u003c/code\u003e must also be specified, or the request will fail.\u003c/p\u003e\n"],["\u003cp\u003eThis API requires the \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This document details the process of updating photo metadata via the `photos:batchUpdate` method. It outlines that you can update fields like pose, place association, and connections, but not photo pixels. The request involves sending `UpdatePhotoRequests` within a `BatchUpdatePhotosRequest` to `POST https://streetviewpublish.googleapis.com/v1/photos:batchUpdate`. An `updateMask` specifies which fields to modify. The response contains a list of `PhotoResponse` objects, indicating the success or failure of each photo update. A maximum of 20 `UpdatePhotoRequest` messages are allowed.\n"],null,[]]