Version: Cognos Analytics 11.1.7 to Current
This Cognos REST API sample python script is first in a series and demonstrates the use of the Upload File REST APIs that enable creation, updating and appending to Cognos user upload files. Stay tuned for additional scripts in the series!
As well as the excellent Java and C Sharp SOAP, Mashup Services and other SDKs, IBM Cognos Analytics with Watson 11.2 has introduced new REST APIs available to help extend and automate customers' use of Cognos. These can greatly help the administration and operational efficiencies in Cognos environments for: uploaded files, users/groups/roles, tenants, data sources, data modules, customizations, etc.
NOTES: As with any API or SDK that can automate Content Store changes, extra care and precautions should be taken and full Content Store backups should be in place when developing, testing and using such tools. Development should be done and thoroughly tested in a backed up sandbox or dev environment before moving client applications upstream to production.
This sample is provided as-is for educational purposes only and should not be used in a Production environment.
The script is designed to be run from the command-line and includes usage help which can be viewed from the command-line: python3 CAFileUpload.py --help. The script is documented using comments and includes information to assist developers in the necessary steps (e.g. using the session_key or XSRF token) when using the Cognos REST API.
For additional information, please refer to the README file.