Auto-learner
Auto-learner

Reputation: 1511

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

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'

Upvotes: 1

Views: 1796

Answers (1)

Joe
Joe

Reputation: 6827

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

Upvotes: 2

Related Questions