Method: accounts.delete
Das Zielkonto wird als vorläufig gelöscht (d. h. „im Papierkorb“) markiert und zurückgegeben.
Diese API bietet keine Methode zum Wiederherstellen von Soft-Deleted-Konten. Sie können sie jedoch über die Papierkorb-Benutzeroberfläche wiederherstellen.
Wenn die Konten nicht vor Ablauf der Frist wiederhergestellt werden, werden das Konto und alle untergeordneten Ressourcen (z. B. Properties, GoogleAdsLinks, Streams, AccessBindings) endgültig gelöscht. https://support.google.com/analytics/answer/6154772
Gibt einen Fehler zurück, wenn das Ziel nicht gefunden wird.
HTTP-Anfrage
DELETE https://analyticsadmin.googleapis.com/v1alpha/{name=accounts/*}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Erforderlich. Der Name des Kontos, das semi-inaktiv gesetzt werden soll. Format: „accounts/{account}“ Beispiel: „accounts/100“
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, ist der Antworttext ein leeres JSON-Objekt.
Autorisierungsbereiche
Erfordert den folgenden OAuth-Bereich:
https://www.googleapis.com/auth/analytics.edit
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-01-14 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]