Page 1 of 1
TM1 Rest Api and Workspace
Posted: Thu Aug 19, 2021 2:57 pm
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?
Re: TM1 Rest Api and Workspace
Posted: Thu Aug 19, 2021 3:24 pm
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..
Re: TM1 Rest Api and Workspace
Posted: Mon Aug 23, 2021 2:14 pm
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
Re: TM1 Rest Api and Workspace
Posted: Mon Aug 23, 2021 4:36 pm
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)
Re: TM1 Rest Api and Workspace
Posted: Tue Aug 24, 2021 8:04 am
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"