Method: accounts.delete
حساب هدف را بهعنوان پاکشده (یعنی «حذفشده») علامتگذاری میکند و آن را برمیگرداند.
این API روشی برای بازیابی حساب های حذف شده نرم افزاری ندارد. با این حال، آنها را می توان با استفاده از سطل زباله UI بازیابی کرد.
اگر حسابها قبل از زمان انقضا بازیابی نشوند، حساب و همه منابع فرزند (به عنوان مثال: Properties، GoogleAdsLinks، Streams، AccessBindings) برای همیشه پاک میشوند. https://support.google.com/analytics/answer/6154772
اگر هدف پیدا نشد، خطا را برمیگرداند.
درخواست HTTP
DELETE https://analyticsadmin.googleapis.com/v1beta/{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 بهوقت ساعت هماهنگ جهانی."],[[["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"]]