Consuming REST API
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:
0