Thanks Yurii. I have another question with with PUT method.
First, I used the following code with (GET) method successfully to copy data from collection "Outlet_Details" where the column "Oracle_Flag" = Y to Oracle DB.
pre ....
-- service's input parameters
-- preparing Request...
l_http_request := UTL_HTTP.begin_request('https://api.appery.io/rest/1/db/collections/Outlet_Details?where=%7B%22Oracle_Flag%22%3A%22Y%22%7D'
, 'GET'
, 'HTTP/1.1');
-- ...set header's attributes
UTL_HTTP.set_header(l_http_request, 'X-Appery-Database-Id', '53f2dac5e4b02cca64021dbe');
--UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_param_list));
-- ...set input parameters
-- UTL_HTTP.write_text(l_http_request, l_param_list);
-- get Response and obtain received value
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.read_text(l_http_response, l_response_text);
DBMS_OUTPUT.put_line(l_response_text);
l_list := json_list(l_response_text);
.../pre
No I tried to use the similar way with (PUT) method in order to update one column in the collection "Outlet_Details" where Oracle_Flag = Y, and update it to "N"
pre ...
-- service's input parameters
l_param_list := 'Oracle_Flag=N';
-- preparing Request...
l_http_request := UTL_HTTP.begin_request ('https://api.appery.io/rest/1/db/collections/Outlet_Details?where=%7B%22Oracle_Flag%22%3A%22Y%22%7D'
, 'PUT'
, 'HTTP/1.1');
-- ...set header's attributes
UTL_HTTP.set_header(l_http_request, 'X-Appery-Database-Id', '53f2dac5e4b02cca64021dbe');
UTL_HTTP.set_header(l_http_request, 'Content-Type', 'application/json');
-- ...set input parameters
UTL_HTTP.write_text(l_http_request, l_param_list);
-- get Response and obtain received value
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.read_text(l_http_response, l_response_text);
DBMS_OUTPUT.put_line(l_response_text);
-- finalizing
UTL_HTTP.end_response(l_http_response);
.../pre
I get the error: "code":"DBSP007","description":"Serialization error"
Are the way I'm using Appery collection parameteres correct?
Thanks,