Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Looking to use the Cognos REST API to trigger a report or schedule

    Posted Thu March 04, 2021 10:51 AM
    Currently, I have a way to establish a session within Cognos Analytics, using the session endpoint. Once I've logged in, I can hit all the basic endpoints, like groups, and files. While those provide some value, the real value would be in triggering a report either based on some event or via a schedule. From what I can tell, in the swagger documentation, there isn't any report, schedule, dispatcher type endpoint.

    Has anyone figured out a way to accomplish something like this? I see there are many datasource endpoints, but nothing seemed helpful. Would also like to open a discussion in general of what anyone else is using the API for. Seems like it's pretty basic for now.

    ------------------------------
    MICHAEL JANDORA
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Thu March 04, 2021 12:48 PM
    The best solution currently is trigger-based scheduling https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ug_cra.doc/c_event-basedscheduling.html

    ------------------------------
    Jason Tavoularis
    ------------------------------



  • 3.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Thu March 04, 2021 02:24 PM
    Hi Jason,

    Thanks for taking the time to respond. We are currently doing that and were hoping to retire that solution as it doesn't work with our Azure SSO integration. The trigger.bat utility is old and outdated. I hope they can add this type of functionality to a new version of the API, so we can retire this and the Windows boxes which must exist to support this.

    ------------------------------
    MICHAEL JANDORA
    ------------------------------



  • 4.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Thu March 04, 2021 03:23 PM

    Hello Michael,

    thank you for bringing this up.

    >While those provide some value, the real value would be in triggering a report either based on some event or via a schedule. 
    Jason has said this. Use triggered schedules. I can confirm this.

    We have seen customer doing so and triggering 50.000+ reports at the end of the month with sales provisions for insurance retails on 100% unix environments (but of course using CLI and host access).

    >Would also like to open a discussion in general of what anyone else is using the API for. Seems like it's pretty basic for now.

    We have used SDK (SOAP) API extensively for configuring, skinning, deployments, user rights, group rights and testing reports (2.500+ reports with over a hundred parameters in serial) .... everything in Java, tested against CA8+10+11.0+11.1
    I would be happy to share code.

    We have used Angular + "REST API" for automating almost anything related to report and data retrieval that the portal offers. Presented this in Miami 2018 and  at IBM think 2019 in SF - including authentication, interactive report running, retrieval of save outputs in different formats ending up in Dashboard with First Contentful Paint in less then 0.5s and fully interactive in less then 2s.

    Apart of that we automated some features we were missing by recording click paths and re-running them in test automators. I imagine that triggering something would be feasible.

    We built quite an extensive testsuite around this and combined it with FOSS test emulators. Testing Querystudio ... create reports, run reports, change sorting, ordering ... Testing cubes: open report on cube, get a cube dimension and test that all expected members are there in the right order ... Would love to share the code and experience.

    We have all projects on github in private repos and have asked @Jason Tavoularis, @RACHEL SU and Chris McPerson on going public. Steve Macko was asked to review if we can open the repos to the public. --> topic is loading, we hope to get a positive response soon. In the meantime I would be happy to share details with licenced IBM Cognos users for sure.

    In the IBM Cognos usergroup for DACH (Germany, Austria, Switzerland) there is a thread about SDK.​​​ I think it must not be limited to "german".

    Ah ... almost forgot the loadtesting plans with jMeter. We have prepared plans with RAMPUP + timing to understand where our environments start queuing in order to calculate expected concurrency and the involved hardware dimensions.

    Looking forward to ideas on the topic.



    ------------------------------
    Ralf Roeber
    https://linkedin.com/in/ralf-roeber-470425a/
    ------------------------------



  • 5.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Thu March 04, 2021 04:42 PM
    Hi Ralf,

    Wow, thanks for the detailed response. This all sounds promising! I guess I should have been a little more clear in when I stated: "Seems like it's pretty basic for now". I meant to be specific in what I believe is available to us from IBM. We recently upgraded to 11.1.7 and were looking to explore the capabilities of the REST endpoints provided here, https://<our_cognos_cloud_instance.com>/api/api-docs/. 

    Currently it appears this IBM provided REST API doesn't cover the reporting triggering; we're still limited to using the trigger.bat as follows. We'd like to move away from this. It would be nice to provide a few REST calls through apache nifi or airflow, or even CA Technologies Autosys.

    trigger.bat http://localhost:9300/p2pd/servlet/dispatch username
    password namespace databaserefreshtriggername,emailtriggername
    Perhaps, we'll have to see what comes of the discussion to go public with regards to the report execution work.

    Thanks,
    Mike

    ------------------------------
    MICHAEL JANDORA
    ------------------------------



  • 6.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Fri March 05, 2021 03:00 PM
    Understood.

    Propose: use a servletfilter to intercept calls, direct "them" to your program and do soap calls, system calls ... we did that implementing a securty check on URL parameters arriving at app.-servers on websphere liberty. would love to explain the details and share code.

    ------------------------------
    Ralf Roeber
    https://linkedin.com/in/ralf-roeber-470425a/
    ------------------------------



  • 7.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Tue March 09, 2021 11:02 AM
    Hi Ralf,

    Thanks for the ideas. I'm currently being advised by IBM to try using the SDK. I'm in the process of obtaining that to see if there is an easy way to call our specific reports through that, as opposed to the trigger.bat.

    Thanks,
    Mike

    ------------------------------
    MICHAEL JANDORA
    ------------------------------



  • 8.  RE: Looking to use the Cognos REST API to trigger a report or schedule

    Posted Wed April 28, 2021 09:24 AM
    trigger.bat can be used on Linux/Unix platform too, it is Cognos SDK based pre-defined java application, platform independent. The only limitation of Trigger utility is you cannot dynamically feed in parameter values. 

    Cognos mashup service is bulit-in light weight REST API (support SOAP too), you can execute any report from that API (after successful authentication).
    Extend, Enhance and Integrate Your BI Solution: The New IBM Cognos 8 Mashup Service - Ironside - Business Analytics. Data Science. Information Management. (ironsidegroup.com)

    Full custom SDK can also be developed to execute report, with capability to feed in parameters from anywhere, and delivery to anywhere. Drop me a line for any specific questions, sma@ironsidegroup.com

    thanks,
    -Susan

    ------------------------------
    Susan Ma
    ------------------------------