COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => SDK => Topic started by: howieB on 23 Nov 2015 11:34:26 AM

Title: Cognos BI Cloud REST API log-on
Post by: howieB on 23 Nov 2015 11:34:26 AM
I'm trying to use REST API of Cognos BI Mashup Service on Cloud. I'm able to get a XML with report (when logged in manually) but when I try to do POST request to log in via API:
https://cognos10.bi.ibmcloud.com/ibmcognos/cgi-bin/cognos.cgi/rds/auth/logon

<credentials>
  <credentialElements>
    <name>CAMNamespace</name>
    <value>
      <actualValue>AZLDAP</actualValue>
    </value></credentialElements>
  <credentialElements>
    <name>CAMUsername</ name>
    <value>
      <actualValue>xxx</actualValue>
    </value></credentialElements>
  <credentialElements>
    <name>CAMPassword</ name>
    <value>
      <actualValue>xxx</actualValue>
    </value></credentialElements>
</credentials>

I get back HTML (possibly redidect to some login page?). Is this API (log on) supported for cloud version of the Cognos BI?

The API for getting the credential info (https://cognos10.bi.ibmcloud.com/ibmcognos/cgi-bin/cognos.cgi/rds/auth/logon?xmlData=<credentials/>) returns the following XML:

<auth:credentialPrompt xmlns:auth="http://developer.cognos.com/schemas/ccs/auth/types/1">
<auth:credentialElements>
<auth:name>CAMReturnAddress</auth:name>
<auth:value>
<auth:actualValue/>
</auth:value>
</auth:credentialElements>
<auth:credentialElements>
<auth:name>CAMNamespace</auth:name>
<auth:value>
<auth:actualValue>AZLDAP</auth:actualValue>
</auth:value>
</auth:credentialElements>
</auth:credentialPrompt>

I.e. it does not contains any "missing" field with user name/pwd.