Previous Topic: Time Zone Specifications

Next Topic: Result Condition Specifications

Filter XML Specifications

You can preset CA Enterprise Log Manager filters for your report in XML format and add them to the getQueryViewer, getReportViewer, or runQuery URL using the filterXML term. You can nest multiple filters, using AND and OR terms and parentheses. You are essentially creating CA Enterprise Log Manager advanced filters in XML.

Important! FilterXml terms are complex, and the API performs no validation. Invalid filter terms result in a query error. For this reason, we recommend that you take particular care in constructing your filter terms.

The available filter elements, listed in the order in which they must be used, are as follows:

When you view a graphical query or report, you can view or adjust the FilterXML terms you set from the advanced filter section of the Local Filter dialog in the viewer interface.

Filter XML Specification Example

This example shows a getQueryViewer call with a filter statement. The filter terms are shown expanded for clarity.

https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getQueryViewer&objectId=Subscription/panels/System_Event_Count_By_Event_Action&server=ELMSERVER&filterXml=
  <Filter logic="" lparens="1" col="source_username" oper="LIKE" val="su" rparens="0"/>
  <Filter logic="AND" lparens="0" col="event_logname" oper="LIKE" val="CALM" rparens="1"/>
</Scope>

"&filterxml=" specifies that a filter statement follows.

The filter statement sets the query to search the source_username column for "su", and the event_logname column for "CALM". Because an AND statement joins the two terms (Filter logic="AND"), only events where each value is found in its respective columns are returned.

More information:

runQuery


Copyright © 2010 CA. All rights reserved. Email CA about this topic