In a reporting application we use, we were using BI 3.x API to produce Web reports. While doing the migration activity to 4.x version, we thought it is fine to go with open doc URL rather than doing the report generation through API.
Many of the samples I have seen uses sIDType
and iDocID
parameters along with token
value to retrieve the document by constructing a URL like below http://server:port/BOE/OpenDocument/opendoc/openDocument.jsp?token=[LogonToken]&iDocID=[XXXX]&sIDType=CUID
But all those URLs get HTML page as response from BI 4.x SAP Web service, the Javascript in that HTML page does the task of retrieving the PDF file.
I am just wondering if there is any way I could retrieve the PDF report as response from the BI Webservice directly ? Please assist me on this. Thanks.
You can if you use the REST SDK to retrieve the document, refresh it and then export it to PDF.
In short, these are the steps:
POST /biprws/logon/long
GET /biprws/raylight/v1/documents/5690743/parameters
PUT /biprws/raylight/v1/documents/5690743/parameters
GET /biprws/raylight/v1/documents/5690743
That last step requires you to pass Accept: application/pdf
in your HTTP headers to get the PDF version.
Detailed information on the REST SDK and the different steps listed above is available on help.sap.com (look for the manual SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Layer).