Nov 2, 2016

A journey through the TM1 REST API

Since its first introduction with TM1 10.2, a number of fix packs have been released with additional improvements and extensions. All new products released by IBM such as CAFE (PAX) and Planning Analytics Workspace (PAW) are using it. It is the THE API for the TM1 server going forward.
The TM1 REST API can be used to do pretty much anything you want with your TM1 server such as building cubes, dimensions, extracting or loading data…

The TM1 REST API journey for a web application

You don’t need any extra components to access your TM1 server with the TM1 REST API. You can follow the IBM official guide and try to tackle the TM1 REST API by yourself, but you need to understand that it isn’t all smooth sailing:

  1. Access TM1 server. This is the challenging part, there are lots of things which can be difficult to set up and not well documented such as cellsets, cross domain scripting and SSL certificates.
  2. Request data. The TM1 REST API supports the OData standard (v4) which provides a common way for accessing data through queries and also updating data.
  3. Transform data. The MDX query will return you a set of cells that you’ll need to transform in a specific format to make it fit in your application.
  4. Visualization: Once your data is ready, you now need to build your web application using HTML.

On the one hand, some things are very simple to do with the TM1 REST API, such as getting the list of cubes and dimensions. On the other hand some things which are trivial to do in TM1, can be very hard to do with the TM1 REST API. For example: getting a cell or updating a value.

Because of these points Cubewise decided to build a development framework on top of the TM1 REST API called Canvas to help TM1 developers to build beautiful user interfaces without all of the scary bits.

TM1 REST API with Canvas

Canvas handles all the way from the server access to data transformation so you can focus on the visualization part. With a mix of HTML and Canvas directives you’ll be able to build a modern web planning and reporting application:

With Canvas, you don’t need to know JavaScript or MDX, the assumption is that if you know how to write a rule or a TM1 process, you’ll quickly learn how to build a TM1 application with HTML. However if you do know JavaScript, you’ll be able to build a more sophisticated application.

Canvas is built with TM1 Developers in mind – it uses immediately recognizable TM1 concepts like DBRs, SUBNMs, Views, etc. and for the first time makes these easy to plug into any web application. DBR in Canvas looks like this:

<tm1-ui-dbr tm1-instance="dev"              tm1-cube="Regional Assumptions"              tm1-elements="Actual,2012,Jan,13,Super Rate"              > </tm1-ui-dbr>

With Canvas, the TM1 REST API is now available to anyone who does not want to rely on limited drag and drop tools to develop sophisticated applications.

READ MORE:

Related content

Loading related content