Reply
Frequent Visitor
Posts: 3
Registered: ‎11-29-2018

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

[ Edited ]

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
Visitor
Posts: 1
Registered: ‎01-07-2019

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

[ Edited ]

@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"
}