cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Re: Problems on creating a new dataset with Power BI's REST API

Thanks a lot @eligr!

 

Suppose once I've created the dataset with PowerBI Desktop, I want to duplicate and modify it to point to other tables of the same database or same HDInsight instance (naturally with the same schema..). Can you explain me the correct steps to do with the Rest API if it's possible?

 

Thank you very much for the fast replay!

 

Best regards,

    Alfredo.

Highlighted
Regular Visitor

Re: Problems on creating a new dataset with Power BI's REST API

@eligr, could you please provide an example about how to create a dataset to Analysis Services?

 

I got the same "FailedToParseConnectionStringError" error.

 

I tried many combinations of properties and different connection string formats.

This is my request:

 

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets

 

 

{
  "name": "ApiTestAasDataset1",
  "isRefreshable": false,
  "isEffectiveIdentityRequired": true,
  "isEffectiveIdentityRolesRequired": false,
  "isOnPremGatewayRequired": false,
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionDetails": {
        "server": "asazure://australiasoutheast.asazure.windows.net/myserver:rw",
        "database": "mydb"
      },
      "connectionString": "Provider=MSOLAP;Data Source=asazure://australiasoutheast.asazure.windows.net/myserver;Initial Catalog=mydb;User ID=myuser@mydomain.com.au;Password=mypassword;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],
  "defaultMode": "AsAzure"
}

 

Highlighted
New Member

Re: Problems on creating a new dataset with Power BI's REST API

Is it possible to create datasets with Datasource type File using Power BI API? If possible what metadata information we need to feed in request body

Highlighted
Regular Visitor

Re: Problems on creating a new dataset with Power BI's REST API

I've been struggling with this as well. I also tried your request, adding 'Cube=Model' to your connectionstring gets you (or at least me with your request body) to the point where I'm stuck - receiving 401 errors...

 

I've create separate thread for this issue here that will hopefully see us resolve both our problems.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021