Creating extensions

You can create extensions that add functions to the IBM® Cognos® Analytics user interface. For example, you can add buttons that, when clicked, open a particular report or dashboard. You can also remove default buttons from the user interface.

To create and upload extensions, you must have Portal Administrator or System Administrator privileges.

CAUTION:
Be judicious when you assign Develop Visualizations access and ensure that you review files that are being uploaded. People who are permitted to upload files may be able to deliver malicious code.

Extensions are defined in a spec.json file that is contained in the root of the extension .zip file. Depending on the extension, there can also be folders that include images, HTML files, and JavaScript files. The structure and contents of the spec.json file is described in spec.json description. The high-level structure of the file is show here.

{
	"name":"...",
	"schemaVersion": "1.0",
	"extensions": [
	{
		"perspective": "common",
		"features": [{
			"id": "...",
			"toolItems": [<tool_item1>,<tool_item2>,...],
			"collectionItems": [<collection_item1>,<collection_item2>,...],
			"excludeFeatures": [<exclude_feature1>,<exclude_feature2>,...],
			"excludeItems": [<exclude_item1>,<exclude_item2>,...]
		}]
	}
}

The value of the perspective element indicates which views will use this extension. A value of common means that the extension is used for all views. The items contained in the features array are used depending on the action of the extension. These are illustrated in the following topics.

By creating extensions, you can modify existing views and create new views. The actions that an extension can perform are listed here and are described in the following topics. A single extension can perform one or more actions.

  • Add a button to the Application or Navigation bars that performs an action such as displaying a web site, running a report, or opening a dashboard, a story, or a folder.
  • Add a menu item to an existing menu that performs an action such as displaying a web site, running a report, or opening a dashboard, a story, or a folder.
  • Add a menu along with its menu items.
  • Remove a default user interface feature or item.
  • Add custom shapes for use in dashboards.
  • Add custom widgets for use in dashboards.