Method: accounts.delete
ทำเครื่องหมายบัญชีเป้าหมายเป็นลบชั่วคราว (เช่น "ทิ้งแล้ว") และแสดงผล
API นี้ไม่มีวิธีการกู้คืนบัญชีที่ลบชั่วคราว แต่สามารถกู้คืนได้โดยใช้ UI ถังขยะ
หากไม่คืนค่าบัญชีก่อนหมดเวลา ระบบจะล้างบัญชีและทรัพยากรย่อยทั้งหมด (เช่น พร็อพเพอร์ตี้, GoogleAdsLinks, สตรีม, 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
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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"]]