2

With Cognos 11, is there any way we can upload a theme using powershell/sql scripts, perhaps by modifying configuration files or the content db?

So I have a scenario in which I need to upload a default theme to Cognos, but would like to avoid to do this manually via the UI as we have to apply this across all our servers, as well as for future installation.

As I know, I can set the default theme in configuration0.properties file at /configuration/data/flipper/config/global/ folder by setting Glass.defaultTheme=myCustomTheme. But I'm not sure how we can go ahead and upload a theme via script..

Anyone has any idea or direction on this?

Ken Timothy
  • 637
  • 7
  • 24

2 Answers2

0

The way to script this, is to create an http put request to the following URL:

https://yourcognosserver/bi/v1/plugins/' + type + '/' + name;

where type is 'themes' for a theme (and 'extenstions' for an extension).

To store the default theme configuration over http as well, doing a put request to"

https://yourcognosserver/bi/v1/configuration/keys/global

with a payload that looks like { ['Glass.defaultTheme']: 'myCustomTheme' }

I implemented the uploading of themes and extensions in https://github.com/CognosExt/cognos-cli. To upload your theme with this tool do:

- install nodejs on your client, see: https://nodejs.org/en/
- open a shell and type:
- npm install -g cognos-cli  (on linux you might have to prepend sudo to this command, on windows you may have to run this as an administrator)
- cognos upload theme -w urlofyourcognos -u username -p password -e yourTheme.zip

The tool does not yet implement updating Cognos settings.

Hope that helps.

Peter
  • 1
  • 1
0

You may have a look at the deployment options to export and import themes in the administration panel.

A quick and dirty workaround: You could then schedule an import to always import a certain archive from the filessytem. As soon as the archive is available the scheduled import would read the theme and distribute the content via distribution service.

Be shure to have the ports configured in cogconfig to GroupContact and SyncHost open.

hth.

Ralf R.
  • 21
  • 3