Cognos Analytics

 View Only
  • 1.  REST API connection string

    Posted Sun May 23, 2021 09:56 PM
    ** For security, I have changed the tokens **

    I am trying to connect to a service using the REST API connector.

    When using the following CURL command it works and I get a JSON response with all the data;
    curl -H "X-ApiKeys:accessKey=abcd1234; secretKey=1234abcd" https://cloud.tenable.com/scans

    When I setup the following REST connection in Cognos along with the key and secret key in the appropriate input dialogs, connection test is successful but I'm only getting the metadata / system tables back, not the actual data like I would using CURL. The below connection works even if I don't supply the keys;
    jdbc:ibmcognos:autorest:https://cloud.tenable.com/scans;

    It seems to me that perhaps the tokens aren't being passed in the headers and reading some IBM documentation it seems maybe additional params are needed in the connection string to tell it to use http headers in the authentication method;
    jdbc:ibmcognos:autorest:https://cloud.tenable.com/scans;AuthenticationMethod=HttpHeader;

    Connection still tests fine but I'm still only getting the system/metadata tables back, not that actual data itself compared to if I run the CURL command. So I assume I still need to get the tokens passed in there somehow, I'm not well versed with building JDBC connection strings for REST APIs, wondering if anyone knows how to build the connection string to be able to pass the https headers/tokens in the connection string itself?

    Thanks.

    ------------------------------
    Mark Peterson
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: REST API connection string

    Posted Tue June 08, 2021 09:08 AM
    Hi Mark,

    Having similar issue while working with HTTPHeader method.

    Connect with IBM Support team for quick resolution since the document supplied do not have exact code which is working Along with IBM Cognos AutoREST Connector driver.

    Thanks
    Jacky

    ------------------------------
    Jacky Patel
    ------------------------------