PATCH /api/v1/customAlerts/rules/{id_list}
Use this method to enable or disable one or more custom alert rules.
Note
This REST API requires Lenovo XClarity Orchestrator v1.3 or later.
Authentication
Authentication with username and password is required.
Resource URI
PATCH https://{management_server_IP>/api/v1/customAlerts/rules/{id_list}
where {id_list} is a list of custom alert rule IDs, separated by a comma. To obtain the alert rule IDs, use GET /api/v1/customAlerts/rules.
Query parameters
None
Request body
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
op | Required | String | Action to take. This can be the following value.
| ||
path | Required | String | Name of the attribute to be modified. This can be one of the following values.
For more information about the attribute, see GET /api/v1/customAlerts/rules/{id}. | ||
value | Required | varies | Attribute value, depending on the data type |
The following example enable the specified custom alert rules.
[
{ "op": "replace", "path": "statusKey", "value": "enabled" }
]
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
401 | Unauthorized | The user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. |
413 | Request Entity Too Large | Clients might impose limitations on the length of the request URI, and the request URI is too long to be handled. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
{message_attributes} | varies | Status messages (see Status messages) |
Give documentation feedback