Greetings -
I have established a REST data source to an endpoint that requires a comma delimited list of identifiers as a parameter. A pretty straightforward GET operation returns the results for processing. I am grabbing the comma delimited list through a query, add the parameter through apex_exec.add_parameter then executing the call using apex_exec.execute_rest_source:
declare
l_params apex_exec.t_parameters;
l_ident varchar2(32767);
begin
-- run query
select listagg(stuff, ',') within group (order by stuff) into l_ident
from table;
apex_exec.add_parameter(l_params, 'ident', l_ident);
apex_exec.execute_rest_source(
p_static_id => 'marketstack',
p_operation => 'GET',
p_parameters => l_params);
-- then process the result
end;
The “ident” parameter is a URL query string, as required by the endpoint.
Unfortunately apex_exec.add_parameters() (for good and secure reasons) escapes the commas in the list, which causes the endpoint to fail. Is there a way to establish an un-escaped parameter to send and still use apex_exec.execute_rest_source()?
Thanks for your help.