Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hallo,
i would like to use a REST API to get data from a server. The issue on this api is , that it needs a body to work proper.
let
url = "http:xxxxxxx/ExecuteCollectionQuery",
body = "[
{
""collectionQuery"" : ""(context) =>
context
.Parts()
.OrderBy(part => part.Id)""
}]
",
Source = Json.Document(Web.Contents(url, [
Headers=
[#"Content-Type"="application/json",
#"Accept-Language"="de",
#"Accept"="*/*",
#"Authorization"="Basic cHJvY2FkOnByb2NhZA==",
#"User-Agent" ="ProwerBi"
], Content=Text.ToBinary(body)
]))
in
Source
As you see in the code above i use 'Basic' authentication hardcoded.
In the connector view i do not have any possibility to add a Body
As i told when executing the query above i works in Desktop. But when publishing to the service i cannot set a refesh , because the dataset needs a gateway connection!
If i want to add the source to the gateway, the connection wont work, because the api need a body, there i cannot put a body.
So how can i use a api in the service ?! Somehow i have to fool the service not to use a gateway, because everything is configuted in the dataset ??!
best regards
Christian
Hi. You shouldn't use gateway. You are right. You can go to Schedule Refresh or Dataset configuration and look for Data Source Credentials. You have to specify the credentials only. Because this is a web source you can avoid gateway.
NOTE: If you have on premise data sources added to the power bi dataset you need to turn an option in your gateway to handle hybrid sources (on premise and cloud)
I hope that helps,
Happy to help!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 16 | |
| 13 | |
| 8 | |
| 8 | |
| 5 |
| User | Count |
|---|---|
| 29 | |
| 29 | |
| 27 | |
| 25 | |
| 24 |