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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Power BI API for Creating Data Sources (Redshift, PostgreSQL) with Server Details

I am looking for guidance on how to use the Power BI API to create datasources, specifically for Redshift and PostgreSQL databases, by providing server details programmatically. I want to automate the process of setting up these data sources in Power BI, so I can efficiently manage and refresh the data within my reports and dashboards.

I am aware that Power BI has extensive documentation and APIs available, but I'm struggling to find specific examples or tutorials on how to achieve this particular task. If anyone has experience with using the Power BI API for creating data sources, I would greatly appreciate your insights and guidance on how to proceed.

Additionally, if you have any tips or best practices on securely managing server details while using the Power BI API, I would love to hear about them. Data security is a top priority, and I want to make sure I'm following the recommended practices.

Thank you in advance for your help!

Status: Investigating
Comments
ashwini155
Regular Visitor

APIS

Anonymous
Not applicable

Hi @ashwini155 ,

 

1. Authenticate with the Power BI API: Before you can create data sources using the API, you will need to authenticate with the Power BI API using an Azure Active Directory (AAD) app. You can find more information on how to do this in the Power BI API documentation.

2. Create a new data source: Once you are authenticated, you can use the Power BI API to create a new data source. You will need to provide the server details for your Redshift or PostgreSQL database, including the server name, database name, username, and password. You can find more information on how to create a data source using the API in the Power BI API documentation.

3. Securely manage server details: To securely manage server details while using the Power BI API, you can store the server details in a secure location, such as an Azure Key Vault, and retrieve them programmatically when needed. You can also use Azure Active Directory to manage access to the server details, so that only authorized users can access them.

For detailed sample support,  here is the better place to go!

 

Best regards.
Community Support Team_Caitlyn

ashwini155
Regular Visitor

We are already did authentication using device login api 
after that what is the api i need to use to create dataset connections in powerbi

I couldn't find it exactly in powerbi api documentation can you please provide a link to the same 

using datasets api, we are able to pull data from a csv file and push data to a dataset which is created using this api .
But to create connections we are unable to find proper api's
@Anonymous