You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Is it possible to use apex_web_service.make_rest_request in Oracle Apex in Oracle Cloud Always Free?

edited Apr 16, 2022 7:22AM in Autonomous Database 2 comments

Summary

Trying to make an external call to a REST web service from Oracle Apex in Oracle cloud and getting ORA-20987

Content

I am making a REST request to an External API from Oracle Cloud (Always Free ATP database) Oracle Apex, but I am getting following error. It works on a hosted 3rd party provider. 

ORA-20987: The requested URL has been prohibited. Contact your administrator

(see code snippet request code)

I was wondering if this is possible with an ATP database in the Oracle Cloud and Oracle Apex.

Many thanks

Kubilay

Code Snippet

declare
v_resp_r clob;
j apex_json.t_values;

begin

v_resp_r := apex_web_service.make_rest_request 
      ( p_url => 'http://api.adzuna.com:80/v1/api/property/gb/search/1' 
      , p_http_method => 'GET' 
      , p_parm_name => apex_util.string_to_table('app_id:app_key:where:max_days_old:sort_by:category:distance:results_per_page:beds') 
      , p_parm_value => apex_util.string_to_table('blahblah:blahblah:TheMoon:90:date:to-rent:4:100:1') 
      );
-- parse json
apex_json.parse(j, v_resp_r);

-- debug 
dbms_output.put_line('v_resp_r is: '|| v_resp_r);

end;
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!