We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Experts,
Power BI data is getting from api link. I have difficulty to connect using token authenticaton . Following is my code. What i am doing wrong here. please advise.
let
test = {username : Lordloc , password : ******},
AccessTokenHeader = "test" & "Bearer *" ,
Headers = [Authorization = AccessTokenHeader],
url = "https://dfsf.cdsfe.ae:3289/dede/getCusfedfsfock",
body = "{ ""plant"" : ""c051"",
""storageLocation"" : ""0001"",
""type"" : ""MARD"",
""sapid"": ""qEP""
}",
Source = Json.Document(Web.Contents(url,[
Headers = [#"Content-Type"="application/json"],
Content=Text.ToBinary(body)
])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"plant", "material", "storageLocation", "warehouseNo", "quant", "storageType", "unrestrictedStock", "stockInTfr", "qualityInsp", "restrictedUse", "blocked", "returns", "totalQuantity", "availableStock"}, {"Column1.plant", "Column1.material", "Column1.storageLocation", "Column1.warehouseNo", "Column1.quant", "Column1.storageType", "Column1.unrestrictedStock", "Column1.stockInTfr", "Column1.qualityInsp", "Column1.restrictedUse", "Column1.blocked", "Column1.returns", "Column1.totalQuantity", "Column1.availableStock"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",{{"Column1.material", "material"}, {"Column1.plant", "plant"}, {"Column1.unrestrictedStock", "unrestrictedStock"}})
in
#"Renamed Columns"
teste
Hi @avictoria ,
Does any error message appear? I can't reproduce your error scenario here.
For now, you may check the following link for reference.
Solved: How to configure Power BI REST API as a data sourc... - Microsoft Power BI Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
How to change API version?
Friends your input is much appreciated.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |