Thank you Paul.
On my latest on-Prem Cognos sandbox (12.0.3-2404172034) REST API authentication does return the session_key.
Though, even I modify the Value or even delete that Key authentication still comes back with the session_key.
On my Cloud trial I do not have access to the Advanced settings. So can't confirm it that Key can fix anything
Original Message:
Sent: Thu September 26, 2024 12:51 PM
From: Paul Mendelson
Subject: Cognos on Cloud trial - REST API authentication with API KEY
I was having a similar issue with my sandbox environment and reached out to Support. They were able to narrow down the problem to a misconfiguration in the advanced settings. While this may not solve all cases where the session_key doesn't appear, it fixed mine.
- Login to Cognos Analytics
- Go to Manage>Configuration>System>Advanced settings
- In the Key field, type the following: Configuration.cookieSameSite
- Then click in the value field and then type 'myDefault' without quotes
I'm not sure if this can help with the free trial environment, if you don't have admin capabilities you won't be able to do it.
------------------------------
Paul Mendelson Product Manager
Product Manager
PMsquare
Original Message:
Sent: Tue September 10, 2024 03:18 PM
From: Andrei Istomine
Subject: Cognos on Cloud trial - REST API authentication with API KEY
Thank you Robert.
I'm testing it using Swagger in CoC ( build 12.0.3-2407130034 )
Rumor has it that the absence of the SESSION_KEY might be due to some misconfiguration of that specific environment...
Just wanted confirmation from IBM.
Original Message:
Sent: 9/10/2024 2:24:00 PM
From: ROBERT WRIGLEY
Subject: RE: Cognos on Cloud trial - REST API authentication with API KEY
I'm using 11.2.4 FP4, and to make it work, I have to first do a GET (with no data) to get the XSRF-TOKEN, then the put with the API key, and I see the session key in the results:
C:\Python> python RestAPI-script.py
Get session
warnings.warn(
{"errorCodeString":"camAuthUserRecoverable","messages":[],"promptInfo":{"displayObjects":[{"name":"CAMNamespaceDisplayName","caption":"Namespace:","type":"display","value":"CJAP"},{"name":"CAMUsername","caption":"User ID:","type":"text"},{"name":"CAMPassword","caption":"Password:","type":"textnoecho"},{"name":"h_CAM_action","type":"hidden","value":"logonAs"},{"name":"CAMNamespace","type":"hidden","value":"CJAP"}],"captions":["Please type your credentials for authentication."]}}
401
<RequestsCookieJar[<Cookie XSRF-TOKEN=bAlVwdmHKtEOrVIyGsgpoTM9m6Sg8mmb for concurssl81.fyre.ibm.com/api>]>
Starting APIKey Session
warnings.warn(
{"generation":3,"shareable":false,"isAnonymous":false,"cafContextId":"CAFW000000a0Q0FGQTYwMDAwMDAwMDlBaFFBQUFEU3JVN2QwREYwNlM5bEZoaS1vY1pRLUdQY0d3Y0FBQUJUU0VFdE1qVTJJQUFBQUE3bzk4Wkwxd1N6ZVRldWp1NTYyYzJnQTlNbHlkSDQxcTloMUJJKnZLUEw0Nzk0NDJ8cnM_","logEnabled":false,"canCallLogon":false,"url":"/api/v1","session_key":"CAM MTsxMDE6ZTRiMThlYzktM2ZkMy00YmVkLWJiNmQtNGJhOTcxOGU0NzU5OjMwOTk4MDU1MTg7MDszOzA7"}
201
------------------------------
ROBERT WRIGLEY
Original Message:
Sent: Sun September 08, 2024 12:23 PM
From: Andrei Istomine
Subject: Cognos on Cloud trial - REST API authentication with API KEY
Greetings!
I have to build a quick POC with Cognos on the Cloud for the Cognos REST API integration.
I am authenticating REST session with the CAMAPILoginKey.
Authentication seems fine but the Server response does not return the Session Key.
Is it intentional on the Cloud Free Trial? Or is it some known issue in the C12 REST API configuration?
@GREG MCDONALD @Shawn Crook
------------------------------
Andrei Istomine
Open to work - anything Cognos
https://www.linkedin.com/in/andreii/
------------------------------