Clear the alert
post
/serviceapi/eventServices/alerts/{alertId}/actions/clear
This operation clears the alert identified by the id.
Request
Supported Media Types
- application/json
Path Parameters
-
alertId: string
The id of the alert
The comment can be optionally added to the alert when it is closed manually
Root Schema : ClearAlertAnnotation
Type:
object
The comment can be optionally added to the alert when it is closed manually
-
comment:
string
The comment to be added to the alert while clearing itExample:
Underlying issue has been fixed for this alert
Response
Supported Media Types
- application/json
200 Response
Alert was cleared
Root Schema : ClearedAlertResponse
Type:
object
The returned response when an alert is closed manually
-
canonicalLink:
string
The link to get details of the cleared alertExample:
/serviceapi/eventServices/alerts/62965132339213727047162539738389170623
-
status:
string
Status of the clear alert operationExample:
OK
400 Response
This error is raised if the manual clear action is not allowed on the specific alert or if the alert id is invalid
Root Schema : InvalidRequest
Type:
object
When invalid alert API request is received, alert system returns this response.
-
errorCode:
string
The alert system's internal error code
-
errorMessage:
string
The alert system's internal error message
-
httpMessage:
string
The http error message
-
httpStatusCode:
string
Default Value:
400
The http status code
500 Response
encountered unhandled exception
Root Schema : UnhandledException
Type:
object
When alert system runs into unhandled exception, it returns this response.
-
errorCode:
string
Default Value:
general_error
The alert system's error code for unhandled exception -
errorMessage:
string
Default Value:
Internal Server Error
The alert system's error message for unhandled exception -
httpMessage:
string
Default Value:
Internal Server Error
The http error message -
httpStatusCode:
string
Default Value:
500
The http status code
Examples
Clear the alert
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -d '{"comment": "Sample comment while closing an alert manually"}' "https://serverurl/serviceapi/eventServices/alerts/62965132339213727047162539738389170623/actions/clear"
The response might look like the following:
{ "status":"OK", "canonicalLink":"/serviceapi/eventServices/alerts/62965132339213727047162539738389170623 }Back to Top