You can unsubscribe existing alert notifications.
Request line
POST baseURL/alertapi.do?action=unsubscribeAlertDef
The request payload is a JSON object.
Request body
{ "alertId":[ , ] }
Request example
POST /alertapi.do?action=unsubscribeAlertDef
{ "alertId":[ 23423, 542324 ] }
Request parameters
Parameter |
Type |
Description |
---|---|---|
alertId | Integer[ ] | List of alert definition IDs to unsubscribe. |
Response structure
{ "unsubscribed":{ "alertId":[ ] } } { "failed":[ { "alertId":, "error":"", "code":"" } ] }
Response example
Success
{ "unsubscribed":{ "alertId":[ 1 ] } }
Error
{ "failed":[ { "alertId":12, "error":"Alert definition with id:[12] not found.", "code":"A6040010" } ] }
Status codes
Status code |
Message |
Description |
---|---|---|
277 | PARTIAL OK | Request completed successfully with some failures. Check the response body for details. |
500 | SERVER ERROR | API operation request failed. Check the response body for details. |
Response codes
The following table lists the alert API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.
Response code | Message | Condition |
---|---|---|
A6040010 | Alert definition with id:[12] is not found. | Invalid alert ID. |
A604000D | User [admin] is already unsubscribed from alert definition [1]. | User is trying to the unsubscribe alertDef. |
A6020019 | Found invalid properties [resources, unknownKey]. | Invalid key is specified. |