Tm1 restapi in C# app

Post Reply
kavitha2002
Posts: 91
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Tm1 restapi in C# app

Post by kavitha2002 » Fri Aug 24, 2018 7:59 am

I would like to use TM1 RESTapi and Tm1web urlapi in C# application, for logging in into my application I am using TM1web urlapi as

$.ajax({
type: "POST",
url: "http://localhost:9510/tm1web/dwrx/jsonp ... vice/login",
dataType: "json",
data: {
param0: sAdminHost,
param1: servername,
param2: user,
param3: password
}, - to access the websheet and views.

but for restapi Should i need any authorization?? or simply I can make a call as http://localhost:8001 with Base64.encode(user + ":" + password);

How to use Tm1 restapi in c# application ?? any Ideas kindly share .. Thanks

User avatar
paulsimon
MVP
Posts: 647
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: 10.1.1 and 10.2.2
Excel Version: 2013

Re: Tm1 restapi in C# app

Post by paulsimon » Sat Aug 25, 2018 3:07 pm

Hi

I suggest that you do a search online. There are documents on TM1RestAPI authentication. From what I can remember the login should pass back a number that you then need to give on all later calls. However, there are differences between standard TM1 Authentication and CAM

Regards

Paul Simon

kavitha2002
Posts: 91
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Tm1 restapi in C# app

Post by kavitha2002 » Sat Aug 25, 2018 5:18 pm

Thanks for your reply. But I am using Standard Tm1 only.

But logging into the Tm1 webapi results in SessionToken, with that I can able to call Websheet and views from tm1.

Any ideas of how to handle the Tm1 restapi calls in c# app.

In the mean time i will also go through the docs.

User avatar
Harvey
Community Contributor
Posts: 218
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: Tm1 restapi in C# app

Post by Harvey » Wed Aug 29, 2018 7:11 am

I have played around with the REST API in C#. I got my test scenarios working with authentication, but can't guarantee it'll work in every case.

If you continue to have issues, PM me and I'll send you some code examples. I probably won't have time to dig through the code until the weekend.
Flow OLAP - thinking outside the cube.

kavitha2002
Posts: 91
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Tm1 restapi in C# app

Post by kavitha2002 » Sun Sep 02, 2018 7:35 pm

Hi,

Thanks for your reply.

In c# application how to make restapi call, and maintain the session. How do we initiate the connection establishment for the further MDX query? Is it something like we have to pass the authorization header as "Basic" and encode64 (userrname+password) and pass it in http client and make request as http://host:8000/api/v1/ActiveSession???

What it does actually?? I am bit confused.

Post Reply