PUT to SQL DB VIEW does not work


#1

I can successfully ‘GET’ and ‘PUT’ from/to my sql table thru swagger and I can successfully ‘GET/PUT’ from my application without issue. However I can only use swagger to update records using an SQL View as it fails when I attempt to ‘PUT’ data thru my application. The failed response is “No record(s) detected in request.”,“code”:400. I have confirmed on the apache access log the exact same api / url is being called.

The api that I am calling thru my application matches the api in swagger exactly: “http://localhost:8080/api/v2/myservice/_table/my_view?id_field=recId&ids=1

I am using the exact same response body when updating the table as when I update the view too.

I am using DF 2.1

Any ideas?


#2

Thought I was done trying to fix this, but I had an idea…I ended up getting it to work thru my application by combining the urls I saw from the PUT url on my table and the PUT url on my view that swagger generates. The final url looked something like this…

http://localhost:8080/api/v2/myservice/_table/my_view/1?recId=1&id_field=recId

Not sure if this is the ‘correct’ format, but it did update my table using the rest url of my SQL View.