Web API Reference Guide > Available API Methods > Monitoring Rules Methods > The monitorGetRulesList Method

The monitorGetRulesList Method

Retrieve a list of monitor rules.

Version: 1.3

Required Permissions: Full

HTTP method: GET

Supported by Editions: Zend Server

Request Parameters:  

Parameter

 Type

Required

Description

filters

Array

No

Add filter parameters in an ad-hoc manner. This parameter is an array with a predefined set of parameters that accept strings or arrays to hold multiple values:

  • applications: array, a list of application IDs to use for retrieving rules rows
  • ruleIds: array, a list of rules IDs to use for retrieving rules rows
  • freeText: Free text filter

Possible Action Specific Error Codes: This action has no specific error codes.

Example

Usage Example

Request (headers removed for the purpose of clarity)

POST /ZendServerManager/Api/monitorGetRulesList

Content-type: application/x-www-form-urlencoded

filters[applications][0]=1&filters[applications][1]=2&filters[freetext]=memory

Response (not all headers are shown)

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

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

<requestData>

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

<method>monitorGetRulesList</method>

</requestData>

<responseData>

<rules>

<rule>

<id>1219644587</id>

<parentId></parentId>

<appId>1</appId>

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

<enabled>true</enabled>

<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>

<triggers>

<trigger>

<severity>normal</severity>

<conditions>

<condition>

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

<attribute>mem-usage</attribute>

<operand>5120</value>

</condition>

</conditions>

<actions>

<action>

<type>send-mail</type>

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

</action>

<action>

<type>tracing</type>

<mode>persist</mode>

</action>

</actions>

</trigger>

</triggers>

</rule>

<rules>

</responseData>

</zendServerAPIResponse>

 

 

 

Read Also

  Available API Methods    
  Monitoring Rules Methods