Method: accounts.delete
Menandai Akun target sebagai dihapus secara sementara (yaitu: "dihapus") dan menampilkannya.
API ini tidak memiliki metode untuk memulihkan akun yang dihapus permanen. Namun, item tersebut dapat dipulihkan menggunakan UI Tong Sampah.
Jika akun tidak dipulihkan sebelum waktu habis masa berlakunya, akun dan semua resource turunan (misalnya: Properti, GoogleAdsLinks, Streaming, AccessBindings) akan dihapus secara permanen. https://support.google.com/analytics/answer/6154772
Menampilkan error jika target tidak ditemukan.
Permintaan HTTP
DELETE https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
Wajib. Nama Akun yang akan dihapus secara soft. Format: accounts/{account} Contoh: "accounts/100"
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons adalah objek JSON kosong.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut:
https://www.googleapis.com/auth/analytics.edit
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-01-14 UTC.
[null,null,["Terakhir diperbarui pada 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"]]