הפונקציה מפעילה משימה חדשה של העברה לארכיון עבור 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. |
startTime |
זה שינוי אופציונלי. חותמת הזמן שמייצגת את נקודת ההתחלה של הנתונים שאתם מייצאים. אם לא מציינים את startTime ב-InitiatePortabilityArchiveRequest, השדה מוגדר לנתונים הכי מוקדמים שזמינים. הפורמט הזה משתמש ב-RFC 3339, שבו הפלט שנוצר תמיד יהיה מנורמלי לפי Z וישמש בספרות עשרוניות של 0, 3, 6 או 9. אפשר להשתמש גם בשינויים (offsets) אחרים מלבד 'Z'. דוגמאות: |
endTime |
זה שינוי אופציונלי. חותמת הזמן שמייצגת את נקודת הסיום של הנתונים שאתם מייצאים. אם לא צוין endTime ב-InitiatePortabilityArchiveRequest, השדה הזה מוגדר לנתונים הזמינים האחרונים. הפורמט הזה משתמש ב-RFC 3339, שבו הפלט שנוצר תמיד יהיה מנורמלי לפי Z וישמש בספרות עשרוניות של 0, 3, 6 או 9. אפשר להשתמש גם בשינויים (offsets) אחרים מלבד 'Z'. דוגמאות: |
גוף התשובה
תגובה מהפעלת משימה של העברה לארכיון.
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
| ייצוג ב-JSON |
|---|
{
"archiveJobId": string,
"accessType": enum ( |
| שדות | |
|---|---|
archiveJobId |
מזהה המשימה להעברה לארכיון שמופעל ב-API. אפשר להשתמש בו כדי לקבל את מצב המשימה. |
accessType |
סוג הגישה של המשימה להעברה לארכיון שה-API יזם. |
היקפי הרשאה
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/dataportability.alerts.subscriptionshttps://www.googleapis.com/auth/dataportability.businessmessaging.conversationshttps://www.googleapis.com/auth/dataportability.chrome.autofillhttps://www.googleapis.com/auth/dataportability.chrome.bookmarkshttps://www.googleapis.com/auth/dataportability.chrome.dictionaryhttps://www.googleapis.com/auth/dataportability.chrome.extensionshttps://www.googleapis.com/auth/dataportability.chrome.historyhttps://www.googleapis.com/auth/dataportability.chrome.reading_listhttps://www.googleapis.com/auth/dataportability.chrome.settingshttps://www.googleapis.com/auth/dataportability.discover.followshttps://www.googleapis.com/auth/dataportability.discover.likeshttps://www.googleapis.com/auth/dataportability.discover.not_interestedhttps://www.googleapis.com/auth/dataportability.maps.aliased_placeshttps://www.googleapis.com/auth/dataportability.maps.commute_routeshttps://www.googleapis.com/auth/dataportability.maps.commute_settingshttps://www.googleapis.com/auth/dataportability.maps.ev_profilehttps://www.googleapis.com/auth/dataportability.maps.factual_contributionshttps://www.googleapis.com/auth/dataportability.maps.offering_contributionshttps://www.googleapis.com/auth/dataportability.maps.photos_videoshttps://www.googleapis.com/auth/dataportability.maps.questions_answershttps://www.googleapis.com/auth/dataportability.maps.reviewshttps://www.googleapis.com/auth/dataportability.maps.starred_placeshttps://www.googleapis.com/auth/dataportability.myactivity.mapshttps://www.googleapis.com/auth/dataportability.myactivity.myadcenterhttps://www.googleapis.com/auth/dataportability.myactivity.playhttps://www.googleapis.com/auth/dataportability.myactivity.searchhttps://www.googleapis.com/auth/dataportability.myactivity.shoppinghttps://www.googleapis.com/auth/dataportability.myactivity.youtubehttps://www.googleapis.com/auth/dataportability.mymaps.mapshttps://www.googleapis.com/auth/dataportability.order_reserve.purchases_reservationshttps://www.googleapis.com/auth/dataportability.play.deviceshttps://www.googleapis.com/auth/dataportability.play.groupinghttps://www.googleapis.com/auth/dataportability.play.installshttps://www.googleapis.com/auth/dataportability.play.libraryhttps://www.googleapis.com/auth/dataportability.play.playpointshttps://www.googleapis.com/auth/dataportability.play.promotionshttps://www.googleapis.com/auth/dataportability.play.purchaseshttps://www.googleapis.com/auth/dataportability.play.redemptionshttps://www.googleapis.com/auth/dataportability.play.subscriptionshttps://www.googleapis.com/auth/dataportability.play.usersettingshttps://www.googleapis.com/auth/dataportability.saved.collectionshttps://www.googleapis.com/auth/dataportability.search_ugc.commentshttps://www.googleapis.com/auth/dataportability.search_ugc.media.reviews_and_starshttps://www.googleapis.com/auth/dataportability.search_ugc.media.streaming_video_providershttps://www.googleapis.com/auth/dataportability.search_ugc.media.thumbshttps://www.googleapis.com/auth/dataportability.search_ugc.media.watchedhttps://www.googleapis.com/auth/dataportability.searchnotifications.settingshttps://www.googleapis.com/auth/dataportability.searchnotifications.subscriptionshttps://www.googleapis.com/auth/dataportability.shopping.addresseshttps://www.googleapis.com/auth/dataportability.shopping.reviewshttps://www.googleapis.com/auth/dataportability.streetview.imageryhttps://www.googleapis.com/auth/dataportability.youtube.channelhttps://www.googleapis.com/auth/dataportability.youtube.clipshttps://www.googleapis.com/auth/dataportability.youtube.commentshttps://www.googleapis.com/auth/dataportability.youtube.live_chathttps://www.googleapis.com/auth/dataportability.youtube.musichttps://www.googleapis.com/auth/dataportability.youtube.playablehttps://www.googleapis.com/auth/dataportability.youtube.postshttps://www.googleapis.com/auth/dataportability.youtube.private_playlistshttps://www.googleapis.com/auth/dataportability.youtube.private_videoshttps://www.googleapis.com/auth/dataportability.youtube.public_playlistshttps://www.googleapis.com/auth/dataportability.youtube.public_videoshttps://www.googleapis.com/auth/dataportability.youtube.shoppinghttps://www.googleapis.com/auth/dataportability.youtube.subscriptionshttps://www.googleapis.com/auth/dataportability.youtube.unlisted_playlistshttps://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 עשוי להשתנות לפני ההשקה. |