I was close 😎.
Original Message:
Sent: Thu January 04, 2024 09:38 PM
From: Jim Boland
Subject: API Authentication - Forbidden
Hi Thomas,
Yes - the ca_data_connector package you found in the CA notebook container is exactly what I'm talking about. ;-)
Almost - you want to use the CADataConnector.connect( ) method. It is overloaded to handle the various environments (e.g. special cases for CP4D, Watson Studio, IBM IBM Cognos Analytics for Jupyter Notebook Server, and the more general case you want to use.) I don't have access to an environment at the moment to look at it, but from memory I think it was something like this:
CADataConnector.connect(
{'url':'…' ,
'namespace': '…',
'user': '…' ,
'password':'…'
});
where url is the URL for the CA gateway, namespace/username/password are the CA authentication credentials. ("user" may be "username" ... can't remember ;-) )
------------------------------
Jim Boland
LinkedIn: https://www.linkedin.com/in/jimboland
Website: https://coreinsightz.com
Email: jimboland@coreinsightz.com
------------------------------
Original Message:
Sent: Thu January 04, 2024 05:43 AM
From: Thomas Strehl
Subject: API Authentication - Forbidden
Hi Jim !
You are talking about /usr/local/lib/python3.11/site-packages/ca_data_connector in the notebook container ?
With authentication along https://developer.ibm.com/apis/catalog/cognosanalytics--cognos-analytics-rest-api/Getting%20Started and Ash's approach ?
Or use CADataConnector.login(host, username=None, password=None, login_body=None) ?
------------------------------
Thomas Strehl
Original Message:
Sent: Wed January 03, 2024 07:20 AM
From: Jim Boland
Subject: API Authentication - Forbidden
Hi Thomas,
While the CADataConnector package works just fine in a stand-alone Jupyter environment, IBM has not publically released it as its own package. (It is only bundled, under the covers, in "IBM Cognos Analytics for Jupyter Notebook Server" and in "IBM Watson Studio". )
------------------------------
Jim Boland
LinkedIn: https://www.linkedin.com/in/jimboland
Website: https://coreinsightz.com
Email: jimboland@coreinsightz.com
Original Message:
Sent: Wed January 03, 2024 05:15 AM
From: Thomas Strehl
Subject: API Authentication - Forbidden
Hi Jim !
Any chance to use CADataConnector python/R packages in standalone Jupyter environments (other than CP4D or CA NB server) to access data assets in CA ?
------------------------------
Thomas Strehl
Original Message:
Sent: Thu January 26, 2023 02:56 PM
From: Jim Boland
Subject: API Authentication - Forbidden
Hi Andrea,
I assume you are using a standalone Jupyter environment, and Ash's response is a great answer (copying the XSRF token to the header as he described is key). However, for completeness I wanted to mention that if you use the integrated IBM Cognos Analytics for Jupyter Notebook Server Or IBM Watson Studio as your Jupyter environment, you can connect/login to CA much easier (through the built in CADataConnector python/R class. Even better, the CADataConnector will allow you to work easily with data assets in CA.
------------------------------
Jim Boland
LinkedIn: https://www.linkedin.com/in/jimboland