เริ่มงานเก็บถาวรใหม่สำหรับ Portability API
คำขอ HTTP
POST https://dataportability.googleapis.com/v1/portabilityArchive:initiate
URL ใช้ไวยากรณ์การแปลง gRPC
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
---|
{ "resources": [ string ], "startTime": string, "endTime": string } |
ช่อง | |
---|---|
resources[] |
แหล่งข้อมูลที่คุณส่งออกข้อมูล ค่าเหล่านี้จะสอดคล้องกับขอบเขต OAuth แบบ 1:1 |
startTime |
ไม่บังคับ การประทับเวลาที่แสดงจุดเริ่มต้นของข้อมูลที่ส่งออก หากไม่ได้ระบุ startTime ใน InitiatePortabilityArchiveRequest ระบบจะตั้งค่าช่องเป็นข้อมูลที่เร็วที่สุดที่ใช้ได้ ใช้ RFC 3339 ซึ่งเอาต์พุตที่สร้างขึ้นจะเป็นรูปแบบ Z-normalized เสมอ และใช้ตัวเลขทศนิยม 0, 3, 6 หรือ 9 ระบบยังยอมรับออฟเซตอื่นๆ นอกเหนือจาก "Z" ด้วย ตัวอย่างเช่น |
endTime |
ไม่บังคับ การประทับเวลาที่แสดงถึงจุดสิ้นสุดของข้อมูลที่ส่งออก หากไม่ได้ระบุ endTime ใน InitiatePortabilityArchiveRequest ระบบจะตั้งค่าช่องนี้เป็นข้อมูลล่าสุดที่มี ใช้ RFC 3339 ซึ่งเอาต์พุตที่สร้างขึ้นจะเป็นรูปแบบ Z-normalized เสมอ และใช้ตัวเลขทศนิยม 0, 3, 6 หรือ 9 ระบบยังยอมรับออฟเซตอื่นๆ นอกเหนือจาก "Z" ด้วย ตัวอย่างเช่น |
เนื้อหาการตอบกลับ
การตอบกลับจากเริ่มงานเก็บ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
---|
{
"archiveJobId": string,
"accessType": enum ( |
ช่อง | |
---|---|
archiveJobId |
รหัสงานเก็บถาวรที่เริ่มต้นใน API ซึ่งสามารถใช้เพื่อดูสถานะของงาน |
accessType |
ประเภทการเข้าถึงของงานเก็บถาวรที่ API เริ่มต้น |
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/dataportability.alerts.subscriptions
https://www.googleapis.com/auth/dataportability.businessmessaging.conversations
https://www.googleapis.com/auth/dataportability.chrome.autofill
https://www.googleapis.com/auth/dataportability.chrome.bookmarks
https://www.googleapis.com/auth/dataportability.chrome.dictionary
https://www.googleapis.com/auth/dataportability.chrome.extensions
https://www.googleapis.com/auth/dataportability.chrome.history
https://www.googleapis.com/auth/dataportability.chrome.reading_list
https://www.googleapis.com/auth/dataportability.chrome.settings
https://www.googleapis.com/auth/dataportability.discover.follows
https://www.googleapis.com/auth/dataportability.discover.likes
https://www.googleapis.com/auth/dataportability.discover.not_interested
https://www.googleapis.com/auth/dataportability.maps.aliased_places
https://www.googleapis.com/auth/dataportability.maps.commute_routes
https://www.googleapis.com/auth/dataportability.maps.commute_settings
https://www.googleapis.com/auth/dataportability.maps.ev_profile
https://www.googleapis.com/auth/dataportability.maps.factual_contributions
https://www.googleapis.com/auth/dataportability.maps.offering_contributions
https://www.googleapis.com/auth/dataportability.maps.photos_videos
https://www.googleapis.com/auth/dataportability.maps.questions_answers
https://www.googleapis.com/auth/dataportability.maps.reviews
https://www.googleapis.com/auth/dataportability.maps.starred_places
https://www.googleapis.com/auth/dataportability.myactivity.maps
https://www.googleapis.com/auth/dataportability.myactivity.myadcenter
https://www.googleapis.com/auth/dataportability.myactivity.play
https://www.googleapis.com/auth/dataportability.myactivity.search
https://www.googleapis.com/auth/dataportability.myactivity.shopping
https://www.googleapis.com/auth/dataportability.myactivity.youtube
https://www.googleapis.com/auth/dataportability.mymaps.maps
https://www.googleapis.com/auth/dataportability.order_reserve.purchases_reservations
https://www.googleapis.com/auth/dataportability.play.devices
https://www.googleapis.com/auth/dataportability.play.grouping
https://www.googleapis.com/auth/dataportability.play.installs
https://www.googleapis.com/auth/dataportability.play.library
https://www.googleapis.com/auth/dataportability.play.playpoints
https://www.googleapis.com/auth/dataportability.play.promotions
https://www.googleapis.com/auth/dataportability.play.purchases
https://www.googleapis.com/auth/dataportability.play.redemptions
https://www.googleapis.com/auth/dataportability.play.subscriptions
https://www.googleapis.com/auth/dataportability.play.usersettings
https://www.googleapis.com/auth/dataportability.saved.collections
https://www.googleapis.com/auth/dataportability.search_ugc.comments
https://www.googleapis.com/auth/dataportability.search_ugc.media.reviews_and_stars
https://www.googleapis.com/auth/dataportability.search_ugc.media.streaming_video_providers
https://www.googleapis.com/auth/dataportability.search_ugc.media.thumbs
https://www.googleapis.com/auth/dataportability.search_ugc.media.watched
https://www.googleapis.com/auth/dataportability.searchnotifications.settings
https://www.googleapis.com/auth/dataportability.searchnotifications.subscriptions
https://www.googleapis.com/auth/dataportability.shopping.addresses
https://www.googleapis.com/auth/dataportability.shopping.reviews
https://www.googleapis.com/auth/dataportability.streetview.imagery
https://www.googleapis.com/auth/dataportability.youtube.channel
https://www.googleapis.com/auth/dataportability.youtube.clips
https://www.googleapis.com/auth/dataportability.youtube.comments
https://www.googleapis.com/auth/dataportability.youtube.live_chat
https://www.googleapis.com/auth/dataportability.youtube.music
https://www.googleapis.com/auth/dataportability.youtube.playable
https://www.googleapis.com/auth/dataportability.youtube.posts
https://www.googleapis.com/auth/dataportability.youtube.private_playlists
https://www.googleapis.com/auth/dataportability.youtube.private_videos
https://www.googleapis.com/auth/dataportability.youtube.public_playlists
https://www.googleapis.com/auth/dataportability.youtube.public_videos
https://www.googleapis.com/auth/dataportability.youtube.shopping
https://www.googleapis.com/auth/dataportability.youtube.subscriptions
https://www.googleapis.com/auth/dataportability.youtube.unlisted_playlists
https://www.googleapis.com/auth/dataportability.youtube.unlisted_videos
ดูข้อมูลเพิ่มเติมได้ที่ OAuth 2.0 Overview
AccessType
enum ของประเภทการเข้าถึงสำหรับงานเก็บถาวร
Enum | |
---|---|
ACCESS_TYPE_UNSPECIFIED |
ค่าเริ่มต้น ค่านี้ไม่ได้ใช้งาน |
ACCESS_TYPE_ONE_TIME |
สิทธิ์เข้าถึงขอบเขตที่ขอแบบครั้งเดียว |
ACCESS_TYPE_TIME_BASED |
อนุญาตให้ส่งออกได้หลายรายการในช่วง 30 วัน ค่า Enum อาจมีการเปลี่ยนแปลงก่อนการเปิดตัว |