Development

Introduction to Cognos Mashup Services

Why Cognos Mashup Services?

There are several alternatives when it comes to accessing a cognos report from an external application, but when we just need to execute a cognos report and get the result quickly without bothering about advanced cognos features, then CMS is our best choice.

The objective of CMS is narrowly focussed on running the report and getting the output by passing the input parameters required by the report logics.

 

How to use CMS

REST interface could be used to extract specific part of a cognos report

A Typical CMS URL for a REST request would look like:

Application + report path + report name + CMS specific attributes + input parameters.

 

Example:

http://servername:port/cognos8/cgi-bin/cognos.cgi/rds/report _path/report_name?selection=SalesList&fmt=JSON?Date=’01-01-2016’&Product=Lantern

Where ‘selection’ refers to a specific cognos object to be extracted from the report, and ‘fmt’ is the attribute which defines response format, and remaining input parameters defined in the cognos report.

 

Let’s consider the below table as SalesList:

Date Product Sales
01-01-2016 Cooking Gear 2000
01-01-2016 Lantern 2500
01-01-2016 Tents 6000

 

The CMS response in JSON would look this:

[{“Date”:”01-01-2016″,”Product”:”Lantern”,”Sales”:2500}]

 

Multi select request:

To perform multi select, we need to reiterate the input parameter with multiple values:

Example:

http://servername:port/cognos8/cgi-bin/cognos.cgi/rds/report _path/report_name?selection=SalesList&fmt=JSON?Date=’01-01-2016’&Product=Lantern&Product=Tents

Response:

[{“Date”:”01-01-2016″,”Product”:”Lantern”,”Sales”:2500},

{“Date”:”01-01-2016″,”Product”:”Tents”,”Sales”:6000}]

About the Author

More from this Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up
Categories