Method: accounts.delete
تضع هذه الدالة علامة على الحساب المستهدَف بأنّه تم حذفه مؤقتًا (أي "مُرسَل إلى المهملات") وتُعيده.
لا تتضمّن واجهة برمجة التطبيقات هذه طريقة لاستعادة الحسابات المحذوفة مؤقتًا. ومع ذلك، يمكن استعادتها باستخدام واجهة مستخدم "المهملات".
في حال عدم استعادة الحسابات قبل وقت انتهاء الصلاحية، ستتم إزالة الحساب وجميع الموارد الفرعية (مثل المواقع وGoogleAdsLinks وStreams وAccessBindings) نهائيًا. https://support.google.com/analytics/answer/6154772
تعرِض رسالة خطأ في حال عدم العثور على الهدف.
طلب HTTP
DELETE https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}
يستخدِم عنوان URL بنية تحويل ترميز 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 (حسب التوقيت العالمي المتفَّق عليه)
[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"]]