Skip to main content

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.0 or later.

Authentication

Authentication with user name 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

AttributesRequired / OptionalTypeDescription
opRequiredStringAction to take. This can be the following value.
  • replace. Replaces the entire attribute value with the specified value.
pathRequiredStringName of the attribute to be modified. This can be one of the following values.
  • statusKey. Enables or disables the custom alert rule.

For more information about the attribute, see GET /api/v1/customAlerts/rules/{id}.

valueRequiredvariesAttribute value, depending on the data type
The following example enable the specified custom alert rules.
[
{ "op": "replace", "path": "statusKey", "value": "enabled" }
]

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
403ForbiddenThe orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body.
413Request Entity Too LargeClients 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

AttributesTypeDescription
{message_attributes}variesStatus messages (see Status messages)