Reputation: 29
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
Upvotes: 1
Views: 8058
Reputation: 29
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
Upvotes: 1