Unsolved

This post is more than 5 years old

20 Posts

672

February 11th, 2015 04:00

Filtering result in URL for export

Hello,

I have a question about the URL used for exporting a report and how to associate a filter on it:

Let's say that I have a simple table report with following three columns:

device Type Model Owner
my-switch FabricSwitch Brocade DCX Backbone Bob
my-second-switch FabricSwitch Brocade 5300 James
my-array Array VMAX20K Bob
another-array Array VMAX40K John
a-third-array Array P9500 John

And the url to export the report in csv is the following is something like:

http://myportal:58080/APG/report.csv?select=0-12-3456789&display=0&mode=srt&statistics=none

I would like to know what I have to add in the URL to generate the report in csv but only to show the results where Type==Array  and Owner==Bob

Thanks,

Jean-Michel

74 Posts

February 23rd, 2015 13:00

Does the tip in this post help?

Create filter for LunID in VIPR SRM

20 Posts

February 25th, 2015 23:00

Hello Dan,

No it does not help, the filter described in the solution is set 'statically' in the report. What i'am  looking for is to set the filter in the URL

As example let's take the all alerts report and let's say the URL to reach it is http://myportal:58080/APG/12345-6789

all_alerts.PNG.png

I would like to export this report in CSV but I only want the alerts sent by the Generic-RSC collector, indicated in the fifth column ( Object )

To expo the report in a csv format, I have two possibilities:

1) Export it from the menu on the top right of SRM: Export->CSV format

2) specify in the browser the url of the report with the following format

http://myportal:58080/APG/report.csv?select=12345-6789&display=0&mode=srt&statistics=none

What I want is to specify the filter in the URL call. I don't want to set the filter in the report through the edit mode or by clicking on the filter icon of the fifth column.

Hope this is a little bit clearer like that.

Regards,

Jean-Michel

2 Intern

 • 

167 Posts

February 26th, 2015 08:00

Hi Jean-Michel,

TL;DR : To filter the report you can use the "refine" argument in the URL.

Here is some details about how to use with the "pseudo-rest" / URL calls :

http:// : /lookup/ { } / / report.jsp? refine= &autologin=api:happy

You can call APG reports directly by using calling URL. The URL call relies on 3 main concepts :

  • Searching a report to display starting from UID of the report then searching the report (red section)
    • You can refer APG breadcrumb for getting report construction
    • You can use pattern * for anything or _ for any character
    • APG will stop on the first matching report
  • Applying a filter to data that compose the report ; this filter is defined in refine parameter (green section)
    • refine use usual APG filters : APG-Frontend-Guide
    • refine parameter value must be escaped
  • Customizing the render (blue section)
    • By default using report.jsp will display the report in full screen
  • For more URL parameters to modify rendering please refer to : APG-Frontend-Guide available with every SRM installation under /opt/APG/Doc

Btw, if you are interested in querying the raw data (not reports, nor formulas) there is a ruby contrib available here : emcvipr/mnrcli · GitHub

It also to query raw data in an interactive console. To support your use-case it will look like :

"devtype='Fabric%' | devtype='%Array'".get(:devtype, :device, :devdesc, :user).uniq.table


If have any ideas of improvement for mnrcli you can open a ticket in github.

HTH

No Events found!

Top