Active IQ Unified Manager Discussions

(WFA) difficulty using filters to create reports


I have been trying to find effective ways to use filters to create reports (that can be emailed or saved) based upon criteria.  My problem is, I am looking for information to display and sort, not to act on / action (as input for other commands).  The workflows that I have been establishing use a loop based on the filter, per line, which will give me the full output, but not in a format that I am able to copy / paste or otherwise use, it just outputs it to the screen following execution.  The wonderful thing about WFA is that I can cross reference several tables and values for my entire environment utilizing OCI and OCUM all in one go, rather than just using sql tools to build tables from each, then finding a way to merge them.


I have run into a few problems with this. 

1. Not all fields that exist as entries in the OCUM database are queryable by stock WFA (and my attempts to define specific values from keys has had very mixed results, mostly bad)

2. how do you take the results of these filter queries and generate a file / email?


The goal:

1. continue to create custom filters to query information based on criteria from within WFA

2. output the results into a format that I can use externally (email, excel, etc)

3. create custom workflows using selected filters on an as needed / desired basis (for use in one-offs, environmental checks, pre-checks for specific actions, etc)



Hi Mike,


There is an old post in community, please have a look , It might help you





What I am looking for is not the success / fail report, what I am looking for is the contents of the filters in a format that i can read and manipulate.  




There are 2 ways to do it.




You can use the REST API to execute your filters and get filter result in a editable format for preparing your reports.




1. You need to know your filter uuid. To get UUID call the API http://<WFA>/rest/filters to get the list of all filters. Now find your filter name and you get your filter UUID. Take the atom link for 'test' which will be something like: http://<WFA>/rest/filters/f6d29198-f6ff-463c-92e1-afeee221a98e/test


2. on this test link call the method GET with something like http://<WFA>/rest/filters/f6d29198-f6ff-463c-92e1-afeee221a98e/test?param1=val1&param2=val2


The response will get you the the filter result in XML/JSON format which can be used to prepare reports.


The response will be something like:



<filterName>Filter to get all WFA servers</filterName>
<cell key="#" value="1"/>
<cell key="httpsPort" value="443"/>
<cell key="ipv4Address" value=""/>
<cell key="#" value="2"/>
<cell key="httpsPort" value="443"/>
<cell key="ipv4Address" value=""/>


Now you prepare your results.


2. I'll tell you this if you didn't like the first way. But 2nd one is worse, so try the first one.








If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.