Forum Discussion
Connect to Business Object Webi report through RESTful request
- 9 years ago
Continuing my previous post:
2 issues arise when I upload to Power BI service and try to refresh through the data gateway:
1) functions are not accepted - fixed easily by adding the logon function within the main query as a subquery
2) the main query credential (anonymous) isn't accepted by Power BI services - fixed by using relativepath in my webcontent()
Also I have added to my query a first subquery to retrieve the report ID of the latest instance of the report stored in Business Object.
If anyone is interested to see the details I am happy to share my query.
Replying to myself:
I used this thread to send a POST call to SAP BO.
My GetToken() function in powerquery looks like this:
let
Source = () => let
body = Text.ToBinary("<attrs>
<attr name=""userName"" type=""string""><username></attr>
<attr name=""password"" type=""string""><password></attr>
<attr name=""auth"" type=""string"" possibilities=""secEnterprise,secLDAP,secWinAD,secSAPR3"">secWinAD</attr>
</attrs>"),
actualUrl = "baseurl",
options = [
Headers =[#"Content-type"="application/xml",#"Accept"="application/json"],
Content=body
],
result = Web.Contents(actualUrl, options),
#"Imported JSON" = Json.Document(result,1252),
logonToken = #"Imported JSON"[logonToken]
in
logonToken
in
Source
Continuing my previous post:
2 issues arise when I upload to Power BI service and try to refresh through the data gateway:
1) functions are not accepted - fixed easily by adding the logon function within the main query as a subquery
2) the main query credential (anonymous) isn't accepted by Power BI services - fixed by using relativepath in my webcontent()
Also I have added to my query a first subquery to retrieve the report ID of the latest instance of the report stored in Business Object.
If anyone is interested to see the details I am happy to share my query.