WebAPI Reference Guide > Available API Methods > Monitoring Rules Methods > The monitorEnableRules Method

The monitorEnableRules Method

Enable a list of Monitor rules.

Version: 1.3

Required Permissions: Full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:  

Parameter

 Type

Required

Description

rulesIds

Array

Yes

List of rules ids to be enabled

Expected Response Code: 202 Accepted

Response Type: A list of the rule elements that were enabled

Possible Action Specific Error Codes:

HTTP Code

Error Code

Description

500

internalServerError

The system could not retrieve the requested rules’ information, possibly due to database error

404

noSuchMonitorRule

The requested rule was not found

Example

Usage Example

Request (headers removed for the purpose of clarity)

POST /ZendServerManager/Api/monitorEnableRules

rulesIds[0]=1

Response (not all headers are shown)

HTTP/1.0 200 OK

<?xml version="1.0" encoding="UTF-8"?>

<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.3">

<requestData>

<apiKeyName><![CDATA[Admin]]></apiKeyName>

<method>monitorEnableRules</method>

</requestData>

<responseData>

<rules>

<rule>

<id>1219644587</id>

<parentId></parentId>

<appId>1</appId>

<name>High Memory Usage (Absolute)</name>

<enabled>true</enabled>

<severity>normal</severity>

<type>request-relative-large-mem-usage</type>

<order>1</order>

<url><![CDATA[...url...]]></url>

<creator>1</creator>

<description>Triggered … memory</description>

<conditions>

<condition>

<operation>number-greater-than</operation>

<attribute>mem-usage</attribute>

<value>5120</value>

</condition>

</conditions>

<actions>

<action>

<type>send-mail</type>

<sendMailTo>![CDATA[Address]]</sendMailTo>

</action>

<action>

<type>tracing</type>

<mode>persist</mode>

</action>

</actions>

</rule>

<rules>

</responseData>

</zendServerAPIResponse>

 

 

Related Links

Related Links:

Available API Methods

 

 

 

© 1999-2013 Zend Technologies, Ltd. All rights reserved.