Cognos Analytics

 View Only
  • 1.  How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Thu November 19, 2020 11:01 AM
    I'm trying to setup a REST datasource and this has several URLs depending on the items you want to query.

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

    it is possible to create a REST file with format file.rest to map all tables in a single file. How can I upload this file to Cognos?

    ------------------------------
    Alex Santamarta
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Fri November 20, 2020 03:21 AM
    Hi Alex,

    The good news is, yes you can upload. The way to do it depends a bit on the type of cloud version you use.

    When talking about CA Hosted, you can use the sftp method to upload your file.rest to any subdirectory under webcontent. Please consult your welcomekit for more info on sftp setup. In this case you can end up configuring your rest api connector as follow:

    jdbc:ibmcognos:autorest:config='/data/dropbox/webcontent/RESTAPI_CONFIG/file.rest';
    or
    jdbc:ibmcognos:autorest:config='https://servername.ca.analytics.ibm.com/RESTAPI_CONFIG/iextrading.rest';

    /data/dropbox/ refers to the sftp endpoint for uploading all your assets to  ca cloud ; any path under this can be used to reference your file.rest ; in above example I created one subdirectory for all my .rest configuration files

    When talking about CA on Demand, you can also upload files (javascript or other) via extension definition. For more info on how to do this , please refer to https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/static/html/HowToUseAnExtensionToHostJavaScript.htm

    Via this method you should be able to address the file via below string

    jdbc:ibmcognos:autorest:config='https://<servername.ca.analytics.ibm.com>/bi/v1/Ext/<EXTENSION_NAME>/file.rest';

    Hope this helps

    Peter

    ------------------------------
    Peter D'Haeyer
    ------------------------------



  • 3.  RE: How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Fri November 20, 2020 11:27 AM

    Given conf= can refer to a URL, the file could be exposed via a remote HTTP server (i.e Apache etc) vs uploading files to a CA env.



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



  • 4.  RE: How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Sat November 21, 2020 05:52 PM
    Edited by System Fri January 20, 2023 04:50 PM
    Thanks Peter, I tested your solution and it works as expected. But, as Nigel suggested, I prefer to keep this information in a separated web server.

    ------------------------------
    Alex Santamarta
    ------------------------------



  • 5.  RE: How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Mon November 23, 2020 09:58 AM
    it is possible to create a REST file with format file.rest to map all tables in a single file. How can I upload this file to Cognos?

    Yes, you can create a JSON format config file to map results of multiple API calls to a schema of your choosing and design.  You can use SFTP to upload this to Cognos.  

    You may have to determine from a system administrator the full root file system path to the "dropbox" folder which Cognos uses for SFTP file transfers so you can specify this name in the ' Config="filename" ' parameter in the JDCB connection string. 


    ------------------------------
    Keith E Carlsen
    AI Insights Leader
    IBM Cloud & Cognitive Software
    ------------------------------



  • 6.  RE: How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Mon November 23, 2020 11:50 AM
    Hello Keith, is this also for the on demand setup or only for hosted solution?

    Where do I get the private SSH key?

    ------------------------------
    Alex Santamarta
    ------------------------------



  • 7.  RE: How to upload a REST endpoint configuration file to IBM Analytics on the cloud

    Posted Tue November 24, 2020 01:42 AM
    Hi Alex,


    Keith is refering to Cognos Hosted. there is no sftp process for on demand. Please refer to my previous note on how to upload extensions in on demand.

    regards

    Peter

    ------------------------------
    Peter D'Haeyer
    ------------------------------