TM1 Rest Api and Workspace

Post Reply
TimeTq
Posts: 9
Joined: Mon Jan 20, 2020 9:06 am
OLAP Product: TM1
Version: 2.0.9.58
Excel Version: 2019

TM1 Rest Api and Workspace

Post by TimeTq »

Hi, does anyone know how to integrate a request in a sheet with URL?

"http://...:5001/api/v1/ActiveUser"

The problem is a "blocked:csp" status. Does workspace have some settings which allow use this domain?
Edward Stuart
Community Contributor
Posts: 248
Joined: Tue Nov 01, 2011 10:31 am
OLAP Product: TM1
Version: All
Excel Version: All
Location: Manchester
Contact:

Re: TM1 Rest Api and Workspace

Post by Edward Stuart »

If you haven't already then it would be worth reading up on Cross-Origin Resource sharing:

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

and Content Security Policy (CSP):

https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP

To get additional help you will need to provide a fair amount more information of what you have tried, how you get the error and details on your environment etc.. etc..
TimeTq
Posts: 9
Joined: Mon Jan 20, 2020 9:06 am
OLAP Product: TM1
Version: 2.0.9.58
Excel Version: 2019

Re: TM1 Rest Api and Workspace

Post by TimeTq »

I made a simple html page with a request ("http://...:5001/api/v1/ActiveUser").

After I created a workbook in workspace with url insert.

I tried to change API_ALLOW_ORIGINS="http://...:5001" and CSP_FRAME_ANCESTORS=" 'self' http://...:5001" in paw.env.

The error I got:
"Refused to connect to 'http://...:5001/api/v1/ActiveUser' because it violates the following Content Security Policy directive: "connect-src 'self'""

PAW is 2.0.53 version
burnstripe
Regular Participant
Posts: 212
Joined: Wed May 06, 2020 2:58 pm
OLAP Product: Planning Analytics
Version: 2.0.9
Excel Version: 2016

Re: TM1 Rest Api and Workspace

Post by burnstripe »

Try upgrading to 2.0.9.1? Under 2.0.9.1 LC fix list there's a fix relating to
REST API connection refused by content security policy (csp) - violation of "connect-src 'self' " directive
APAR (PH21359)
TimeTq
Posts: 9
Joined: Mon Jan 20, 2020 9:06 am
OLAP Product: TM1
Version: 2.0.9.58
Excel Version: 2019

Re: TM1 Rest Api and Workspace

Post by TimeTq »

According
https://code.cubewise.com/blog/determin ... -analytics

I have 2.0.9.1 and 2.0.9.3 versions of pal on different servers.

Maybe I made wrong insert in page?
My url insert looks like "//srv-ibm:9510/tm1web/MyPage/test.html"
Post Reply