Method: alerts.undelete
Restores, or "undeletes", an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a NOT_FOUND
error. Attempting to undelete an alert which has not been marked for deletion has no effect.
HTTP request
POST https://alertcenter.googleapis.com/v1beta1/alerts/{alertId}:undelete
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
alertId |
string
Required. The identifier of the alert to undelete.
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"customerId": string
} |
Fields |
customerId |
string
Optional. The unique identifier of the Google Workspace account of the customer the alert is associated with. The customerId must have the initial "C" stripped (for example, 046psxkn ). Inferred from the caller identity if not provided. Find your customer ID.
|
Response body
If successful, the response body contains an instance of Alert
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/apps.alerts
For more information, see the Authorization guide.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-22 UTC.
[null,null,["Last updated 2024-08-22 UTC."],[[["Restores an alert that was marked for deletion within the past 30 days using the alert's unique identifier."],["Requires a POST request to the specific endpoint `https://alertcenter.googleapis.com/v1beta1/alerts/{alertId}:undelete`."],["An optional `customerId` can be included in the request body but is inferred if not provided."],["Successful responses return the restored alert's details."],["Requires the `https://www.googleapis.com/auth/apps.alerts` OAuth scope for authorization."]]],["This describes how to undelete an alert using the Alert Center API. A `POST` request is sent to `https://alertcenter.googleapis.com/v1beta1/alerts/{alertId}:undelete` with the required `alertId` path parameter. The request body may contain an optional `customerId` string. Successful responses return an `Alert` instance. This action is only valid for alerts deleted within the last 30 days. The API uses gRPC Transcoding and requires the `https://www.googleapis.com/auth/apps.alerts` authorization scope.\n"]]