Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to get the response from an APEX_EXEC.EXECUTE_REST_SOURCE call from PL/SQL block

sonsistemJan 20 2024

I'm being unable to get the response from an APEX_EXEC.EXECUTE_REST_SOURCE call.

Rest source is operational, if I test the operation in APEX it works:

But when I try it from a PL/SQL block I get an error. Here's my code:

DECLARE
    l_params apex_exec.t_parameters;
    v_result clob;
BEGIN


    apex_session.create_session (
    p_app_id   => 101,
    p_page_id  => 2,
    p_username => 'GENERAL' );

    apex_exec.add_parameter( l_params, 'series_id', 75297 );
    
    apex_exec.execute_rest_source(
        p_static_id        => 'series',
        p_operation        => 'GET',
        p_parameters       => l_params );

     v_result:=apex_exec.get_parameter_clob(l_params,'response');  
  
END;

And the error I get:

Error report -
ORA-01403: no data found
ORA-06512: a "APEX_230200.WWV_FLOW_EXEC_API", line 47
ORA-06512: a "APEX_230200.WWV_FLOW_EXEC_API", line 2043
ORA-06512: a line 19
01403. 00000 -  "no data found"

If I comment out the get_parameter_clob function the code executes correctly, but obviously I need to work with the data returned by the REST source.

These are the parameters defined in the REST data source:

Thanks for any help. Appreciate it.

This post has been answered by jariola on Jan 21 2024
Jump to Answer
Comments
Post Details
Added on Jan 20 2024
2 comments
1,546 views