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

Consuming REST API

Accepted answer
32
Views
5
Comments

Hi,

BEGIN

v_url := 'https://api.test.com/products/v3/objects/locations/';

apex_web_service.g_request_headers.DELETE();

apex_web_service.g_request_headers(1).name := 'Authorization';

apex_web_service.g_request_headers(1).value := 'Bearer ' ||'TEST123';

v_clob := apex_web_service.make_rest_request(p_url => v_url,p_http_method => 'GET');

APEX_JSON.parse(json_content, v_clob);

row_count := APEX_JSON.get_count(p_path => '.' ,p_values => json_content);

--dbms_output.put_line(row_count);

IF row_count > 0 THEN

FOR i in 1 .. row_count LOOP

v_member_id := APEX_JSON.get_varchar2(p_path => '['|| i ||'].id', p_values => json_content);

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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