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

The monitorExportRules Method

Create an xml document that contains all monitor rules for an application. This document conforms to the structure required by the Deployment package to include rules in a zpk.

Note that this action returns an unusual xml format and does not conform to the rest of the API in terms of structural conformity. The XSD for validating the document is provided in the appendices at the end of the document

Also note that this action returns only an XML output - it is not allowed to return a JSON format and an 406 error will be returned for a JSON output request.

Version: 1.3

Required Permissions: Full

HTTP method: GET

Supported by Editions: Zend Server

Request Parameters:  

Parameter

 Type

Required

Description

applicationId

Integer

No

Application to retrieve rules for. Default: Global rules

retrieveGlobal

Boolean

No

Indicates if to retrieve a combined list of application specific rules and global rules. Default: TRUE.

Possible Action Specific Error Codes:

HTTP Code

Error Code

Description

406

outputTypeLimited

This action does not have a JSON formatted response.

Example

Usage Example

Request (headers removed for the purpose of clarity)

GET /ZendServerManager/Api/monitorExportRules?applicationId=2

Response (not all headers are shown):

HTTP/1.0 200 OK

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>monitorExportRules</method>

</requestData>

<responseData>

<rules>

<rule>

<ruleProperties>

<rule_type_id>function-error</rule_type_id>

<name><![CDATA[Database Error Rule]]></name>

<description><![CDATA[Triggered when one ...]]></description>

<enabled>Yes</enabled>

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

</ruleProperties>

<ruleConditions>

<condition>

<operation>string-in-list</operation>

<attribute>function-name</attribute>

<operand>mssql_connect|mssql_execute|....|db2_exec</operand>

</condition>

</ruleConditions>

<ruleTriggers>

<trigger>

<triggerProperties>

<severity>1</severity>

</triggerProperties>

<triggerConditions>

<condition>

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

<attribute>mem-usage</attribute>

<operand>8192</operand>

</condition>

<condition>

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

<attribute>mem-usage-....-change</attribute>

<operand>60</operand>

</condition>

</triggerConditions>

<triggerActions>

</triggerActions>

</trigger>

</ruleTriggers>

</rule>

</rules>

</responseData>

</zendServerAPIResponse>

 

Read Also

  Available API Methods    
  Monitoring Rules Methods