Forum Discussion

Don-Bot's avatar
Don-Bot
Helper V
1 year ago
Solved

Create Fabric/Power BI Gateway Programmatically?

Is there a way I can create a power bi gateway programmatically, similar to how we can use xmla endpoints to create semantic models with code?  

 

I am looking for a way I could automate creating gateways in the service without having to do this manually.  I haven't found anything online yet about this so wanted to ask.


Edit:  What I'm referring to is after the on premise gateway is installed on the server and you setup the connection in power bi service.  I was wondering if I could setup that part programmatically

 

5 Replies

  • Sounds like a VBI.

     

    You would need to implement all the steps that follow the installation (proxy configuration, trusted sites, folder permissions, adding to cluster, logging in, installing all the drivers etc etc.)

     

    What you could think of is to create a boilerplate image that has all this already configured, and then handle only the cluster addition programmatically.

     

    And don't forget - if you delete the anchor member from the gateway then all the connections will go poof!

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi Don-Bot,

    Happy to see you here in the Microsoft Fabric Community!

     

    Currently, you cannot create a Power BI gateway programmatically using APIs; it must be manually installed and registered.

    Install an on-premises data gateway | Microsoft Learn.

    Once the gateway exists, you can automate managing data sources using the Power BI REST API.

    Gateways - Create Datasource - REST API (Power BI Power BI REST APIs) | Microsoft Learn.

    By  using these APIs, you can automate the management of data sources within your Power BI gateways, reducing the need for manual intervention.

    Refer to the Microsoft documentation below for detailed information on the available endpoints.
    Gateways - REST API (Power BI Power BI REST APIs) | Microsoft Learn

     

    If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!

     

    Regards,
    Sahasra.

     

    • Don-Bot's avatar
      Don-Bot
      Helper V

      Hi v-sgandrathi  and lbendlin ,I didn't mean install the gateway on premises.  I meant setup the connection in the Power BI Service.  

      Actually v-sgandrathi  in reading your reply I believe you may have the answer with create datasource.  I will try that out and get back to you (accept as solution or not)

      Sorry for the confusion I'll edit my post

       



      • v-sgandrathi's avatar
        v-sgandrathi
        Community Support

        Hi Don-Bot,

         

        I wanted to check in your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply as Accepted solution and give Kudos that helped you. It would be greatly appreciated by others in the community who may have the same question.

         

        Thank you.