Forum Stats

  • 3,851,919 Users
  • 2,264,053 Discussions
  • 7,904,904 Comments

Discussions

Generate report in APEX by leveraging BIP REST API.

User_4N3WL
User_4N3WL Member Posts: 4 Employee

hello Team,

i am working on integrating APEX and BIP. I am able to run my report in BIP from POSTMAN and i am getting correct response.

But when i try to run the report from an APEX application by leveraging APEX_WEB_SERVICE.MAKE_REST_REQUEST i get a strange issue.

I get an error message stating that 'ora_sqlerrm: ORA-22921: length of input buffer is smaller than amount requested ORA-06512:'.

I have pasted my code below.

Please let me know if you have any suggestions on how to proceed further

Thank you

/---------------------------------------------code--------------------------------------------------------------------------------------------------/

DECLARE

  l_multipart apex_web_service.t_multipart_parts;

  l_request_blob blob;

  l_resp_clob clob;

  l_url varchar2(4000);

BEGIN  l_url := 'https://MyOACserver/xmlpserver/services/rest/v1/reports/Share%252FLicenseReport/run';  apex_web_service.append_to_multipart (

  p_multipart => l_multipart,

  p_name => 'ReportRequest',

  p_content_type => 'application/json',

  p_body => '{"attributeFormat":"pdf"}' );  l_request_blob := apex_web_service.generate_request_body (

  p_multipart => l_multipart ); l_resp_clob := apex_web_service.make_rest_request(

  p_url => l_url,

  p_username => 'username',

  p_password => 'Password',

  p_http_method => 'POST',

  p_body_blob => l_request_blob);--htp.p(l_resp_clob);

END;

Tagged:

Best Answer

Answers