Cognos Analytics

 View Only
Expand all | Collapse all

Python Cognos Analytics with REST API

  • 1.  Python Cognos Analytics with REST API

    Posted Tue September 26, 2023 03:15 PM

    Hey Community and Experts,

    I would like to generate Cognos reports using Python. Is this possible at all? I could not find any documentation regd. running of reports programatically. There is Cognos Documentation regarding REST APIs but I could not find anything related to running of Reports.

    Here is what my request is:

    Does the Cognos API allow us to specify the following:

    1. which report to run
    2. with the appropriate parameters for example - customer, time range, etc...

    I want to use Python to achieve this.

    NOTE: I have used parameterized URLs that will return customized urls. But I want to achieve this via REST APIs and python. Any help appreciated. 

    #Cognos Analytics with Watson


  • 2.  RE: Python Cognos Analytics with REST API

    IBM Champion
    Posted Wed September 27, 2023 04:43 AM

    Hi Srihari,

    Yes the "new Cognos REST API"  (i.e. ) is mostly focused on automating the administrative operations of CA (e.g. managing users/groups/roles, UI customization like extensions and themes, Content Manager content, datasources/modules, etc.) 

    Probably more suited to what you are trying to accomplish is the Cognos Mashup Service ( ) - and specifically the REST API option within CMS. With it, you can login into Cognos, run reports (including specifying the parameters for prompted reports). As well if you want the resulting report output returned (as opposed to just run and saved in the CA portal) you can specify the format you want the report results returned in (e.g. image, HTML, HTML fragment, XML, JSON. Or you can