1

I have an Oracle Business Intelligence Publisher 12.2.1.2.0 server running and I am trying to call the REST API services in order to access a report (i.e, TestReport) present over the server by using Postman tool. I am using various methods (GET, POST, PUT and DELETE) available over the Oracle documentation to get the relevant data from the server. But, only three of the methods (Get report definition, Get report sample data and Get XDO schema) are working fine and the rest are giving either of the following errors: 400 Bad Request or 415 Unsupported Media Type or 404 Not Found or 405 Method Not Allowed or Could not get any response. Most of the errors are associated with the POST and PUT methods so there may be some data format issue with the request. The request URL is: http://localhost:port/xmlpserver/services/rest/v1/reports/Components%2FTestReport/

Please help. I have attached one of the responses for "Run Report". Post Method:: Header Post Method:: Body

Pralay Das
  • 29
  • 1
  • 8

1 Answers1

1

SOLVED:: Add the associated headers and body in the proper format and then send the POST request. For Example- For running a report In Postman tool: URL: http://localhost:port/xmlpserver/services/rest/v1/reports/Components%2FTestReport/run

Authorization:: username/password --> Preview Request

Headers:: (Key/Value) 1. Authorization/Basic... 2. Content-Type/multipart/form-data; boundary="Boundary_1_1153447573_1465550731355" 3. Accept/multipart/form-data

Body:: --Boundary_1_1153447573_1465550731355 Content-Type: application/json Content-Disposition: form-data; name="ReportRequest"

{"byPassCache":true,"flattenXML":false,"attributeFormat":"pdf"} --Boundary_1_1153447573_1465550731355--

It will generate the report in PDF format Refer: https://docs.oracle.com/middleware/12211/bip/BIPAP/op-v1-reports-%7BreportPath%7D-run-post.html

Pralay Das
  • 29
  • 1
  • 8
  • 1
    I have the same issue but I get ns1:Client.NoSOAPAction no SOAPAction header! biserver. Can you please share a screenshot of your Postman configuration? – Konstantinos Jan 31 '18 at 10:08
  • Above is the configuration for the Postman only for running the report (POST). – Pralay Das Feb 07 '18 at 07:06
  • @PralayDas I have tried to post the request for runReport using request body similar to above with attributeType as pdf. In the response , however I am getting {"reportContentType":"application/pdf"} and in the content area, a pdf stucture that starts with %PDF-1.6.. Again the stream portion within this seems to be encoded. If I am calling the runReport from my Springboot application, which further returns the response to UI, could you please suggest a way how I can 1) filter the response to get the pdf content alone and 2) decode the pdf so that I can download the pdf from UI. Thanks! – Krishna Jul 01 '20 at 08:26
  • @PralayDas - i meant to filter out the response content from the multipart form data response. Is there any java utility which will help me in this. And any idea as to why the stream portion within the content has replacement characters (question mark in black diamond). Could it be an encryption issue. – Krishna Jul 03 '20 at 11:32
  • @Krishna I think there is no such provision of getting only the PDF content from the BIP server. You can try to configure the report in the server to send the BASE64 data of the report instead which you can use directly to preview in the UI. From the preview screen the file can be downloaded in PDF format. You can refer the BIP documentation for report in Base64 data format. – Pralay Das Jul 04 '20 at 05:41
  • @Pralay Das , Thanks. I have seen that the SOAP requests to BIP server returns response with report content in Base64 format (for the same report). Will try out if it's a configurable parameter . – Krishna Jul 05 '20 at 11:31
  • Finally what worked for me is setting the "PDF Compress Output" option at BIP level as false, and parsing the ReportOutput from the multipart response. – Krishna Jul 17 '20 at 10:46