Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
francescbarraga
New Member

Doubt about Power BI Rest API -gateway

Hello!

 

I need some help using Power BI REST API  without Gateway. Let me explain the situation:
We want to create refreshable datasets with the PowerBI REST API using CSV data from the web (our company webserver) as datasources.
We can create a similar datasource in PowerBI manually without a gateway.
The API endpoint for creating a new datasource requires a gateway.
We want to avoid creating a gateway because it is not required for CSV datasources.

The question is,  how to create a datasource without a gateway using the PowerBI REST API as a service principal?

 

Thanks for your support

1 ACCEPTED SOLUTION

Ok. No I don't believe the rest api can do that.

 

You'd need to look at the XLMA end point and interfacing with the tabular object model in C#.

 

https://docs.microsoft.com/en-us/analysis-services/tom/tom-pbi-datasets?view=asallproducts-allversio...


https://powerbidevcamp.powerappsportals.com/sessions/session04/

 

Also worth looking at tabular editor 3 if you're just trying to add a table

to an existing dataset in the service. You can create a table and paste the M code straight into it's partition.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

5 REPLIES 5
bcdobbs
Community Champion
Community Champion

Hi,

I'm assuming you're looking at this end point...

https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/create-datasource

 

It is specifically talking about a datasource in a gateway.

 

What is the end result you want to achieve? Wondering if you're really after a power bi dataflow to make the data available with the service?



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Hello Ben,

 

We want to avoid the use of a gateway... is it possible using PowerBI REST API?

Afraid I'm not 100% clear on what you're attempting to do.

 

If you have an existing dataset you can configure it to automatically refresh within the service or use 

 

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset

 

to refresh the dataset or specific tables within it. That definently doesn't need a gateway.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Thanks!

 

As far as I know, this endpoint is used to refresh a dataset that needs to have an underlying datasource for refreshing.

The problem is not that we cannot create datasets that can be refreshed from a datasource.

The problem is that we cannot create the underlying datasource with the PowerBI REST API in the first place.

 

Can we import Power Query M code with the REST API? With the code, we can describe a dataset and its datasource.

Ok. No I don't believe the rest api can do that.

 

You'd need to look at the XLMA end point and interfacing with the tabular object model in C#.

 

https://docs.microsoft.com/en-us/analysis-services/tom/tom-pbi-datasets?view=asallproducts-allversio...


https://powerbidevcamp.powerappsportals.com/sessions/session04/

 

Also worth looking at tabular editor 3 if you're just trying to add a table

to an existing dataset in the service. You can create a table and paste the M code straight into it's partition.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.