Method: photo.startUpload
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Permintaan HTTP
POST https://streetviewpublish.googleapis.com/v1/photo:startUpload
URL menggunakan sintaksis gRPC Transcoding.
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons akan berisi instance UploadRef
.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut ini:
https://www.googleapis.com/auth/streetviewpublish
Untuk informasi selengkapnya, lihat Ringkasan OAuth 2.0.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[[["\u003cp\u003eInitiates an upload session to facilitate uploading photo bytes using the returned UploadRef.\u003c/p\u003e\n"],["\u003cp\u003eUploaded photos must meet specific requirements, including Photo Sphere XMP metadata and size specifications.\u003c/p\u003e\n"],["\u003cp\u003eUpon completion, the UploadRef is utilized with photo.create to generate the Photo object entry.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty for the POST request to \u003ccode\u003ehttps://streetviewpublish.googleapis.com/v1/photo:startUpload\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/streetviewpublish\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This describes how to start uploading photo bytes for Street View. It involves creating an upload session using a POST request to `https://streetviewpublish.googleapis.com/v1/photo:startUpload` with an empty request body. The response returns an `UploadRef` URL, which is used to upload the photo bytes. The photo needs Photo Sphere XMP metadata and must meet Google Maps' size requirements, including being a full 360-degree panorama. Finally use the `UploadRef` with `photo.create` to finalize. The process requires OAuth scope `https://www.googleapis.com/auth/streetviewpublish`.\n"],null,["# Method: photo.startUpload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates an upload session to start uploading photo bytes. The method uses the upload URL of the returned [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef) to upload the bytes for the [Photo](/streetview/publish/reference/rest/v1/photo#Photo).\n\nIn addition to the photo requirements shown in \u003chttps://support.google.com/maps/answer/7012050?ref_topic=6275604\u003e, the photo must meet the following requirements:\n\n- Photo Sphere XMP metadata must be included in the photo metadata. See \u003chttps://developers.google.com/streetview/spherical-metadata\u003e for the required fields.\n- The pixel size of the photo must meet the size requirements listed in \u003chttps://support.google.com/maps/answer/7012050?ref_topic=6275604\u003e, and the photo must be a full 360 horizontally.\n\nAfter the upload completes, the method uses [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef) with [photo.create](/streetview/publish/reference/rest/v1/photo/create#google.streetview.publish.v1.StreetViewPublishService.CreatePhoto) to create the [Photo](/streetview/publish/reference/rest/v1/photo#Photo) object entry.\n\n### HTTP request\n\n`POST https://streetviewpublish.googleapis.com/v1/photo:startUpload`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [UploadRef](/streetview/publish/reference/rest/v1/photo#UploadRef).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/streetviewpublish`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]