TM1 REST API - OLAPLINE · TM1 REST API. Nothing was impossible it was just hard, that’s...
Transcript of TM1 REST API - OLAPLINE · TM1 REST API. Nothing was impossible it was just hard, that’s...
An introduction to TM1’s, OData compliant, REST API
Hubert Heijkers, STSM, Chief Architect TM1 Server and OData evangelist
Dusseldorf, April 27th 2016
TM1 REST API
Nothing was impossibleit was just hard, that’s presuming you knew what to use and how
Agenda
Introduction OData
Introduction TM1’s REST API
What makes this API different
Chatting with the server (Demo)
OpenAPI, OData goes OpenAPI, and so is TM1
Try it yourself using Swagger-UI (Demo)
References
3
Introducing OData
OData‘s vision is to make (open) data Consumable and Interoperable
Consumable meaning it is:
– Discoverable, Structured, Self-describing
– Navigable, arguably Human Readable and Programmable
Interoperable by:
– Using a common language to describe the data
– Using common conventions and semantics to query and navigate the data
– Representing the data using a common payload format
There needs to be a web-based API that programmers can use on any platform to
retrieve the minimum set of relevant data
4
Web API Practices
REST
– Popular style for creating, retrieving, modifying and deleting (CRUD) resources on
the web through common verbs
– Doesn’t provide interoperable
Doesn’t describe service and resources
Doesn’t define semantics
Doesn’t define a representation for the resources
JSON
– Popular format for data interchange
– Human readable, easy to parse
– Not sufficient for interoperability
Multiple ways to represent the same data
Not self describing
No facility for annotating raw data with important metadata5
OData
OData is a set of common conventions and best practices on top of REST and JSON for
well-designed, interoperable data access
Common metadata description language (CSDL)
– Human- and machine-readable consumer oriented data model
Common URL conventions
– Filter, Sort, Order, project, navigation, expansion
Common Semantics
– Paging, versioning, update semantics, extensibility, batching, functions and actions
JSON representation
– Payload description, count, type information, ids, etags
– Navigation, edit and media links
6
OData Adoption
7
OData – the best way to RESTAn open protocol for the creation and consumption of
query-able and interoperable RESTful APIs
Introducing TM1’s RESTful API
Introduced in TM1 10.2 RP2 (Q2 2014)
TM1’s first HTTP and JSON based API
Following the Open Data (OData) standard!
– Provides a machine readable description of the API, a.k.a. the metadata or CSDL
– Following all OData‘s URL Conventions
– Using the OData JSON Format for all its payloads
Exposing TM1 Server as a Service to it’s consumers
Making it easy to interact with TM1 from within any environment
Native support build into the TM1 server
9
Opening up TM1 to the massesis what we are really doing with this API
What makes this API different
Standards based
Cloud ready
Language independent
Support by a broad community
Overall easy of use
Better performance, especially over a WAN
Easing the integration of TM1 Server
GOAL: Everything you can do with TM1 Server you can do thru this API
11
DEMOLets have a chat with the server…
OpenAPI Initiative (OAI)
OAI focusses on a vendor neutral, RESTful, API Description Format
Based on the Swagger Specification
IBM is one of the founding members of the OAI consortium
IBM acquired StrongLoop to strengthen its position in this space
OData is aligning with OAI
– Sharing API definitions using a shared, JSON Schema based, format
– Allowing OData schemas to be expressed in Swagger (with extensions)
– Making OData services available in Swagger tooling, most notably Swagger-UI
13
TM1 EDM
DEMOInteracting with TM1’s REST API using the Swagger-UI…
What is the REST API being used for?
Traditional ‘consumers’
– Applications consuming purpose build TM1 models
Modelers/Modeling tools
– Creating and maintaining models
Applications/Application builders
– Purpose build applications using TM1 ‘under the covers’
Processes/automation
Development tool integration
– Change tracking
– ‘Projectize’ TM1 model development
16
REST API short term Road Map
Most recently we added:
– Transaction log support
– Message log support
– Support for deltas (read: change tracking in the server)
In future major/minor version(s):
– Alternate Hierarchy support
– Server Settings (Configured and Active)
– Logger Settings
– Cover remaining TM1 functionality currently lacking
– Adding support for faster data loads and extracts
– TI Process input and output redirection
– Everything else required to implement “TI as a Service”
17
What’s on the horizon for the REST API
Data as a Service
– Using the power of TM1 to drive an Entity Data Model
– Making the data IN a TM1 model available as an, OData compliant, service
– Allowing the data in TM1 to be queried as if it were a relational source
A ‘model definition language’?
– An agreed upon representation of a model that describes the model
Serviceability build in
– Support for high availability and fail-over
– These abilities would, apart from any related management, be opaque
18
The future is brightThe REST API is influencing the future of TM1, and only just started
References
TM1 SDK developerWorks Community
OData – the best way to REST
OASIS Open Data Protocol (OData) Technical Committee
OData Specification
– Part 1: Protocol
– Part 2: URL Conventions
– Part 3: Common Schema Definition Language (CSDL)
– OData JSON Format
OpenAPI Initiative
20
Questions
?Think of any more questions later?
Don’t hesitate to contact me or send an e-mail to [email protected]
21