Page 1 of 1

executeRESTRequest by TM1 API

Posted: Mon Nov 09, 2015 11:30 am
by michasmik
Hi, in TM1 API there is a method called executeRESTRequest:

public TM1Val executeRESTRequest(NGRequestMethod requestMethod,java.lang.String resource,java.lang.String jsonParam,java.lang.String contentType,java.lang.String dataType, java.lang.String contents)

Request that I want to execute: http://localhost:9999/api/v1/Processes( ... m1.Execute

I logged via CAMNamespace to server but when i try to execute this method on current server that error occur: NGAPIError

What is the properly semantic for this request ?

Re: executeRESTRequest by TM1 API

Posted: Mon Nov 09, 2015 9:42 pm
by paulsimon
Hi

I suggest you do some searches for the Rest API on this forum. You should find links that will give you what you want. The Rest API is pretty new. From what I have seen of the documentation it is not perfect. The request is somewhat more complex than your example. If all you want to do is to execute a TI process then there are easier ways than the Rest API such as an Action Button, the TM1RunTI.Exe or even the conventional API C/VB or Java Bean API.

I am sure that the Rest API will be a good thing for integration with third party tools, but I am not too sure that it is that friendly for end users.

Regards

Paul

Re: executeRESTRequest by TM1 API

Posted: Mon Nov 09, 2015 9:55 pm
by BrianL
There is an executeRESTRequest function in the java API, however it's completely undocumented and predates the ODATA REST API significantly.

The request URI you said you actually want to execute is part of the ODATA based API. The documentation is on an IBM developerworks site and can be found at https://www.ibm.com/developerworks/comm ... I%2010.2.2