הפונקציה מפעילה משימה חדשה של העברה לארכיון עבור Portability API.
בקשת HTTP
POST https://dataportability.googleapis.com/v1/portabilityArchive:initiate
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
ייצוג ב-JSON |
---|
{ "resources": [ string ], "startTime": string, "endTime": string } |
שדות | |
---|---|
resources[] |
המשאבים שמהם מייצאים נתונים. הערכים האלה תואמים ביחס של 1:1 להיקפי הרשאות ה-OAuth. |
start |
זה שינוי אופציונלי. חותמת הזמן שמייצגת את נקודת ההתחלה של הנתונים שאתם מייצאים. אם לא מציינים את startTime ב-InitiatePortabilityArchiveRequest, השדה מוגדר לנתונים הכי מוקדמים שזמינים. הפורמט הזה משתמש ב-RFC 3339, שבו הפלט שנוצר תמיד יהיה מנורמלי לפי Z וישמש בספרות עשרוניות של 0, 3, 6 או 9. אפשר להשתמש גם בשינויים (offsets) אחרים מלבד 'Z'. דוגמאות: |
end |
זה שינוי אופציונלי. חותמת הזמן שמייצגת את נקודת הסיום של הנתונים שאתם מייצאים. אם לא צוין endTime ב-InitiatePortabilityArchiveRequest, השדה הזה מוגדר לנתונים הזמינים האחרונים. הפורמט הזה משתמש ב-RFC 3339, שבו הפלט שנוצר תמיד יהיה מנורמלי לפי Z וישמש בספרות עשרוניות של 0, 3, 6 או 9. אפשר להשתמש גם בשינויים (offsets) אחרים מלבד 'Z'. דוגמאות: |
גוף התשובה
תגובה מהפעלת משימה של העברה לארכיון.
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
ייצוג ב-JSON |
---|
{
"archiveJobId": string,
"accessType": enum ( |
שדות | |
---|---|
archive |
מזהה המשימה להעברה לארכיון שמופעל ב-API. אפשר להשתמש בו כדי לקבל את מצב המשימה. |
access |
סוג הגישה של המשימה להעברה לארכיון שה-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 עשוי להשתנות לפני ההשקה. |