Cognos Analytics

 View Only
  • 1.  Rest API - no Metadata / rows returned

    Posted Thu December 17, 2020 08:30 AM
    Edited by System Fri January 20, 2023 04:50 PM

    ---SOLVED ---

    Hi 

    I'm battling to get the new Rest API (Progress) to work.

    I can connect and 'Load Metadata', but the table contains no rows, and just one column called 'Message'.

    I can view the data using the endpoint in Swagger - so have no idea what is happening.

    I am trying to connect to a Cloud database (Caspio).  Is it a Cognos / Progress / Caspio issue ..?

    Scant documentation around....

    Any suggestions would be greatly appreciated.



    ------------------------------
    Heather Staniland
    ------------------------------


    #CognosAnalyticswithWatson


  • 2.  RE: Rest API - no Metadata / rows returned

    Posted Tue December 22, 2020 02:53 AM

    Hello all

    Just to say that I solved my problem.  I was not actually connecting properly - even though the 'Test' said successful, it wasn't really connecting.  I had to add a whole lot of extra authentication properties, and also create a Bearer token (used Postman) and added that in the AccessToken property.

    Here is my example Oauth2 Rest API connection string:  (where xxxxxx is just for privacy):

    jdbc:ibmcognos:autorest:sample='https://xxxxxx.caspio.com/rest/v2/tables/Client/records'; AuthenticationMethod=OAuth2;AccessToken=E6oPuq9_0bFw875bb58bnDHKOjf6XkO5F1U2l1xNEtsle3tLbHajk57aKGED_N28T4H96uh9x9f3MlV5pzXhentsG1qDjTJ8t-6sj40oH_zv-TGiU6rJdPQucxo-hxntDG0ns9MhWlBcgfICE-slTSEFgAqYEOnL4xRNJIrJ8UiDHEn5BMV8HmLLrseUKKhno89mfd7gEZVcVIbLgg88RU-1AanhqbKqNNYoGl0102Sm3-DvUE2JnIAk_7sUcUQGW7EbOjnhwMx_12j25JV619i7f1f6_Cp7It7vPCM7M9An1SGV8wvPFrQEVXb9A7jw15wAxhcklN6s0LrJU2O3v5_mdLcSaDjO62Ufu2vWAYhJBlopsFv7-XxyO--T0;ClientID=678670d686f8a34c95a1839ca31f4edabd123b24f93ba585dae7;ClientSecret=ee567867f43bda67f19fbd9abff9cc8af14a9eb297b6b5c;



    ------------------------------
    Heather Staniland
    ------------------------------



  • 3.  RE: Rest API - no Metadata / rows returned

    Posted Mon January 11, 2021 12:54 PM

    Sounds like the end point you are referencing is returning a JSON response which essentially represents a failure.

    If you try the end point (Curl, Postman etc), what responses (HTTP codes and JSON)  are you getting?

    https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ag_manage.doc/autorestjdbcug.pdf?view=kc



    ------------------------------
    NIGEL CAMPBELL
    ------------------------------