Getting started with the Cognos TM1 Web URL API

You create a URL by using a base URL and specific TM1® parameters and then pass the completed URL to the TM1 Web server. The completed URL opens and displays a Websheet or CubeViewer object. You can also use the URL API to apply various actions on these objects.

The base URL and the parameters are separated by the hashtag symbol (#) and assembled in the following format:

BaseUrl#Parameters

If you want to include multiple parameters in the same URL, separate them with the ampersand symbol (&).

BaseUrl#Parameter1=value&Parameter2=value&Parameter3=value

Web browser address bar example

Copy and paste the following URL into the address bar of your web browser to see a simple example of the URL API.

http://localhost:9510/tm1web/UrlApi.jsp#Action=Open&Type=CubeViewer&Cube=plan_BudgetPlan&View=Budget%20Input%20Detailed&AccessType=Public&AdminHost=localhost&TM1Server=Planning%20Sample&Username=admin&Password=apple

Using the URL API in web pages

The URL API uses HTML inline frames (<iframe> tag) to display CubeViewer and Websheet objects in your custom web pages. The <iframe> tag is the primary way to display CubeViewer and Websheet objects with the URL API.

After a TM1 Web object is displayed in an iframe, you can then apply actions on that object by updating the src (source) property of the iframe with a new URL.

For more information, see Using HTML <iframe> tags to display Cognos TM1 Web objects.