Method: accounts.delete
הפונקציה מסמנת את חשבון היעד כחשבון שנמחק באופן זמני (כלומר, "הועבר לאשפה") ומחזירה אותו.
ל-API הזה אין שיטה לשחזור חשבונות שנמחקו באופן סופי. עם זאת, אפשר לשחזר אותם באמצעות ממשק המשתמש של פח האשפה.
אם החשבונות לא ישוחזר לפני מועד התפוגה, החשבון וכל המשאבים הצאצאים (למשל: נכסים, קישורים ל-Google Ads, מקורות נתונים, קישורי גישה) יימחקו לתמיד. https://support.google.com/analytics/answer/6154772
הפונקציה מחזירה שגיאה אם היעד לא נמצא.
בקשת HTTP
DELETE https://analyticsadmin.googleapis.com/v1beta/{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)."],[[["Marks an account as soft-deleted, effectively sending it to the trash but allowing for restoration before permanent deletion."],["Permanently deletes the account and all associated resources after a certain expiration time if not restored."],["Requires the `analytics.edit` OAuth scope for authorization."],["Uses a `DELETE` request to the specified endpoint with the account ID as a path parameter."],["The request body should be empty, and a successful operation will return an empty response body."]]],["This API endpoint soft-deletes an account by its name using a `DELETE` request to `https://analyticsadmin.googleapis.com/v1beta/{name=accounts/*}`. The `name` path parameter (e.g., \"accounts/100\") is required. The request body must be empty. Upon successful deletion, it returns an empty JSON object. The operation is irreversible via the API, requiring UI restoration before a certain time to prevent permanent data loss. It needs `https://www.googleapis.com/auth/analytics.edit` authorization. An error is returned if the target account is not found.\n"]]