Madhu Madhu -4 years ago 198
reST (reStructuredText) Question

How to export CSV's using SAP BO web intelligence through REST API?

I have a requirement where i need to export CSV files from SAP BO webi reports using GUI or API automation. Is there any way we can export report's data into CSV files using REST API's ? I have tried following options from OpenDocument documentation but there is no option to export CSV file for webintelligence.

url='http://'+obr_ip+':6405/biprws/logon/long'
base_url='https://'+obr_ip+':8443/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID='
export_options = '&sOutputFormat=H&sRefresh=Y&lsSEnter+number+of+days(X):=100&lsSEnter+values+for+Job+Type:=no_value'

Answer Source

It depends on whether you want to export the report query (i.e., raw data), or report (semi-formatted). For query, use the following:

http://<serverName>:6405/biprws/raylight/v1/documents/{documentID}/dataproviders/{dataproviderID}/flows/{flowID}

Set accept to text/plain to receive the result in CSV format.

For reports in CSV format, use:

http://<serverName>:6405/biprws/raylight/v1/documents/{documentID}/reports/{reportID}

Set accept to text/csv to receive the result in CSV format.

For both, replace <serverName>, {documentID}, {dataproviderID}, {documentID}, {reportID], and {flowID} as appropriate

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download