REST API - How to pass parameters to a webreport using rest api call
Dear Experts,
Using REST API we can call webreports using url - /api/v1/webreport and in body we have to pass webreport nickname to execute the report . i want to know how to pass input parameters to the webreport when making a rest api call. please provide a example to understand .
Thank you .
Comments
-
Just did this today. In my Java code I have something like this:
String url = getAPIURL(1).concat(String.format("nodes/%d/output?format=webreport", rptID));
if (!params.isEmpty()) {
debug("Adding parameters");
//url.concat("?");
//boolean isFirst = true;
Enumeration<String> keys = params.keys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
String urlParam = String.format("&%s=%s", key, params.get(key));
debug("Adding key " + key);
url = url.concat(urlParam);
}
}
debug("Reporting url = " + url);which ultimately generates a URL like this:
cs.exe/api/v1/nodes/[rptID]/output?format=[webreport|json]&inputlabel1=some%20value&inputLabel2=Some%20other%20value
Depending on your Web Report you may have more luck with format=webreports or format=json
If you do format=webreports, it just returns your webreport results as a string. This is useful if your web report already outputs JSON. If you use format=json, you will get back a single JSON object of the form {{"data" : {"one big ginormous string which is your WR data"}
Once again, YMMV
-Hugh
0 -
Dear Garg Ravi,
check the documentation.
Click on CS help and navigate as below. you can call any thrid party URL here and integrate it the webreports.
Help->Reports->Detailed WebReports Examples->AJAX Examples
0 -
Hi @Meerasaaheb_Mohmmad , AJAX call we cannot pass certficate and ket right, i am having this issue, do you have any idea.
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management