Unsolved
This post is more than 5 years old
20 Posts
0
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
No Events found!



dnorton1
74 Posts
0
February 23rd, 2015 13:00
Does the tip in this post help?
Create filter for LunID in VIPR SRM
JMGuillaume
20 Posts
0
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
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
Flo_csI
2 Intern
•
167 Posts
1
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 :
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 :
If have any ideas of improvement for mnrcli you can open a ticket in github.
HTH