Method: accounts.delete
حساب هدف را بهعنوان پاکشده (یعنی «حذفشده») علامتگذاری میکند و آن را برمیگرداند.
این API روشی برای بازیابی حساب های حذف شده نرم افزاری ندارد. با این حال، آنها را می توان با استفاده از سطل زباله UI بازیابی کرد.
اگر حسابها قبل از زمان انقضا بازیابی نشوند، حساب و همه منابع فرزند (به عنوان مثال: Properties، GoogleAdsLinks، Streams، AccessBindings) برای همیشه پاک میشوند. https://support.google.com/analytics/answer/6154772
اگر هدف پیدا نشد، خطا را برمیگرداند.
درخواست HTTP
DELETE https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
name | string مورد نیاز. نام حساب برای حذف نرم. قالب: accounts/{account} مثال: "accounts/100" |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ یک شی JSON خالی است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/analytics.edit
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-14 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-14 بهوقت ساعت هماهنگ جهانی."],[[["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"]]