Method: accounts.delete
הפונקציה מסמנת את חשבון היעד כחשבון שנמחק באופן זמני (כלומר, "הועבר לאשפה") ומחזירה אותו.
ל-API הזה אין שיטה לשחזור חשבונות שנמחקו באופן סופי. עם זאת, אפשר לשחזר אותם באמצעות ממשק המשתמש של פח האשפה.
אם החשבונות לא ישוחזר לפני מועד התפוגה, החשבון וכל המשאבים הצאצאים (למשל: נכסים, קישורים ל-Google Ads, מקורות נתונים, קישורי גישה) יימחקו לתמיד. https://support.google.com/analytics/answer/6154772
הפונקציה מחזירה שגיאה אם היעד לא נמצא.
בקשת HTTP
DELETE https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
name |
string
חובה. השם של החשבון שרוצים למחוק באופן סופי. פורמט: accounts/{account}. דוגמה: "accounts/100"
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה הוא אובייקט JSON ריק.
היקפי הרשאה
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/analytics.edit
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-01-14 (שעון UTC).
[null,null,["עדכון אחרון: 2025-01-14 (שעון UTC)."],[[["This API request soft-deletes a specified Google Analytics 4 account, essentially moving it to the trash."],["Soft-deleted accounts and their associated data are permanently deleted after a certain time period, unless restored through the Trash Can UI."],["The request requires the `analytics.edit` scope for authorization and uses a `DELETE` request with the account name as a path parameter."],["There's no specific API method to restore deleted accounts; restoration is handled via the Google Analytics UI."],["If the targeted account is not found, the request will return an error."]]],["This API endpoint soft-deletes an account via a `DELETE` request to `https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}`, where `name` is the account identifier (e.g., \"accounts/100\"). The request body must be empty. A successful operation returns an empty JSON object, and the action requires the `https://www.googleapis.com/auth/analytics.edit` OAuth scope. Soft-deleted accounts are recoverable via the Trash Can UI but will be permanently purged after an expiration period if not restored. The API does not contain a method to restore an account. An error will be returned if the account is not found.\n"]]