REST API Not Working. Cannot Configure Correctly

Post Reply
User avatar
ptownbro
Posts: 31
Joined: Wed Apr 05, 2017 3:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013
Location: Los Angeles, CA

REST API Not Working. Cannot Configure Correctly

Post by ptownbro »

I have been able to successfully use VBA to automate creation and execution of TI processes as well as other objects using the traditional methods I have experience with to get my head around it. I'm now moving on to the preferred method of REST API, but am having trouble getting REST API going on our server. Following the instructions in the documentation, I have configured the tm1s.cfg file and entered the following in our browser's address bar and am getting errors or no results:

https://<fully_qualified_domain_name>/api/v1/

Here is our set up:

1. We have installed TM1 over two separate servers.
2. TM1 Web is installed on a server named "mywebserver".
3. TM1 Admin Server and TM1 Server are installed on a server named "myadminhostserver".
4. TM1 Web is accessed using "http: // mywebserver.my.domain.com:9510/tm1web"
5. We have one TM1 Server named TestingRestApi with the following in the tm1s.cfg file:

Code: Select all

[TM1S]
#ServerLogging=F
#SecurityPackageName=TestRestApi
IntegratedSecurityMode=1
UseSSL=F
ServerName=TestRestApi
DataBaseDirectory=D:\TM1\TestRestApi\data
LoggingDirectory=D:\TM1\TestRestApi\logfiles
AdminHost=myadminhostserver.my.domain.com
PortNumber=12000
Language=ENG
Protocol=tcp  
SaveTime=   
DownTime=   
ProgressMessage=False  
AllowSeparateNAndCRules=T
DistributedPlanningOutputDir=tunit
PersistentFeeders=T
RunningInBackground=T
ForceReevaluationOfFeedersForFedCellsOnDataChange=T
SupportPreTLSv12Clients=T
6. Our tm1s.cfg file is at the root directory "D:\TM1\TestRestApi\tm1s.cfg"

We've tried different variations of URLs but are not getting results. Examples below (please ignore the spacing couldn't figure out how to make it not be a link).

The following generate the error "404 - File or directory not found":

http: // mywebserver.my.domain.com/api/v1/
http: // mywebserver.my.domain.com/tm1web/api/v1/
http: // myadminhostserver.my.domain.com/api/v1/
http: // myadminhostserver.my.domain.com/tm1web/api/v1/

The following generate the error "Page can't be found":

http: // mywebserver.my.domain.com:9510/api/v1/
http: // myadminhostserver.my.domain.com:12000/tm1web/api/v1/

The following generate the error "HTTP Status 404 - ...blah ... Appache Tomcat/6.0.45":

http: // mywebserver.my.domain.com:9510/tm1web/api/v1/

The following never resolved (kept spinning in the browser):

http: // myadminhostserver.my.domain.net:12000/api/v1/

Is there some other configuration that needs to be done?
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: REST API Not Working. Cannot Configure Correctly

Post by declanr »

For the REST API to work you need HTTPPortNumber specified in your TM1s config file; I can't see it in yours.

For example if you specify a HTTPPortNumber of 1234 in a TM1 server the URL to use would be:
http://MyServer:1234/api/v1/
Declan Rodger
User avatar
ptownbro
Posts: 31
Joined: Wed Apr 05, 2017 3:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013
Location: Los Angeles, CA

Re: REST API Not Working. Cannot Configure Correctly

Post by ptownbro »

Um. So... that was a dumb mistake :oops:

I guess I didn't read my edits close enough. I saw "HTTPPortNumber" in the documentation, but used "PortNumber" in my config file.

Thanks! That worked for me.
Post Reply