Based on the documentation, IBM Cognos Analytics includes REST APIs to perform create, read, update, and delete operations on Cognos Analytics data. If you read CRUD operations, it means Create, Read, Update and Delete.
There is a documentation that is useful when you need to use Cognos REST API with different languages such as cURL, Ruby, Python, PHP, Java, Node, Go and Swift: https://developer.ibm.com/apis/catalog/cognosanalytics--cognos-analytics-12-1-x/Introduction
Full descriptions of available endpoints are available in the REST API reference section or from your Cognos Analytics instance at the following URL:
http://<cognos_analytics_server>:9300/api/api-docs/
or
https://<cognos_analytics_on_cloud>/bi/api/api-docs/
To create personal API keys, refer to the documentation. Here's what you need to know (as it's not covered in the documentation):
- when an API key is unlocked, it can be used.
- when an API key in locked, it is disabled.
Warning: When you create a new key, you need to copy (and save it in your preferred location for password and other secrets).
Cognos Analytics on Cloud implements a three-factor authentication process: IBMid credentials, password, and multi-factor authentication (MFA).
To use RESP API for Cognos Analytics, you need to start by creating a session using PUT /session.
We will start with DELETE /session to be sure there is no current session:
You should receive a code 204 which is session deleted.
Now, let's use PUT /session to attempt to create or update a session (log in).

If we were using a single login (with a namespace based on LDAP), we would use:
{"parameters":[{"name":"CAMNamespace","value":"NAMESPACEID"},{"name"
:"CAMUsername","value":"USERNAME"},{"name":"CAMPassword","value":"PASSWORD"}]}
We will discard this syntax because MFA is used. We will use:
PUT /session with the following body (where value is your API key):
{"parameters": [{"name": "CAMAPILoginKey","value": "AWk4RTVFOEQ3ZEkzMjE0NTVCOEZEMTREODdBMTU5NEEzOBTK4LF1gvUZ25WeZTpZJ8ns4sqd"}]}
You should see the following:

then
201 means Session created.
From here, we can use any listed API, such as GET /extensions.


200 means Successful operation.