Method: accounts.delete
Đánh dấu Tài khoản mục tiêu là đã xoá tạm thời (tức là "đã chuyển vào thùng rác") và trả về tài khoản đó.
API này không có phương thức để khôi phục các tài khoản đã xoá không vĩnh viễn. Tuy nhiên, bạn có thể khôi phục các tệp đó bằng giao diện người dùng Thùng rác.
Nếu bạn không khôi phục tài khoản trước thời điểm hết hạn, thì tài khoản và tất cả tài nguyên con (ví dụ: Tài sản, GoogleAdsLinks, Luồng, AccessBindings) sẽ bị xoá vĩnh viễn. https://support.google.com/analytics/answer/6154772
Trả về lỗi nếu không tìm thấy mục tiêu.
Yêu cầu HTTP
DELETE https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
name |
string
Bắt buộc. Tên của Tài khoản cần xoá một phần. Định dạng: accounts/{account} Ví dụ: "accounts/100"
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ là một đối tượng JSON trống.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/analytics.edit
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-01-14 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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"]]