REST API - using Cellsets return Error 505 HTTP Version Not Supported

Post Reply
EP_explorer
Regular Participant
Posts: 174
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

REST API - using Cellsets return Error 505 HTTP Version Not Supported

Post by EP_explorer » Fri Apr 12, 2019 1:24 pm

I'm investigating features of REST API and found a problem with using Cellsets.

I'm using the article
https://www.ibm.com/support/knowledgece ... lsets.html

Next 2 examples (Java code):
1) Attempt of updating the cell
1 step
URL u = new URL("https://servername:port/api/v1/Cubes('CubeName')/Views('ViewName')/tm1.Execute?$expand=Cells($select=Ordinal,FormattedValue,Consolidated)");
HttpURLConnection c = (HttpURLConnection) u.openConnection();
...
c.setRequestMethod("POST");
c.connect();

return
{"@odata.context":"../../$metadata#Cellsets(Cells(Ordinal,FormattedValue,Consolidated))/$entity","ID":"syDu-jM9AIByAAAg","Cells":
[{"Ordinal":0,"FormattedValue":"Jan 2019","Consolidated":false},
{"Ordinal":1,"FormattedValue":"Jan 2018","Consolidated":false},
....
{"Ordinal":6,"FormattedValue":"12","Consolidated":false},
...
{"Ordinal":17,"FormattedValue":"Commited","Consolidated":false}]}

Step 2
Using ID "syDu-jM9AIByAAAg" I'm trying to update
https://servername:port/api/v1/Cellsets('syDu-jM9AIByAAAg')/Cells[{ "Ordinal": 6, "Value": 11} ]
String st1="https://servername:port/api/v1/Cellsets('" + ID + "')/Cells[{ \"Ordinal\": 6, \"Value\": 11} ]";
URL u1 = new URL(st1);
HttpURLConnection c1 = (HttpURLConnection) u1.openConnection();
c1.setRequestProperty("X-HTTP-Method-Override", "PATCH");
c1.setRequestMethod("POST");
c1.connect();

I receive message
[HTTP/1.1 505 HTTP Version Not Supported]

2) Attempt of GetPartion
Step1 is the same as in 1st Attempt
Step 2
String st1="http://servername:port/api/v1/Cellsets('" + ID + "')/tm1.GetPartition(Begin=0, End=1)?$expand=Members";
URL u1 = new URL(st1);
HttpURLConnection c1 = (HttpURLConnection) u1.openConnection();
c1.setRequestMethod("GET");
c1.connect();

The response is the same
[HTTP/1.1 505 HTTP Version Not Supported][

User avatar
macsir
Community Contributor
Posts: 628
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1, SSAS
Version: 9.5 - 10.2
Excel Version: 97 - 2013
Contact:

Re: REST API - using Cellsets return Error 505 HTTP Version Not Supported

Post by macsir » Sun Apr 14, 2019 9:50 pm

Google this error 505 HTTP Version Not Supported should give you some ideas but off the top of my head, you probably should use latest httpclienthttp://hc.apache.org/httpcomponents-client-ga/ component with your Java code rather than in-built one. That one is out-of-date.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/

Post Reply