cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alfdagos Frequent Visitor
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.

tpaz Visitor
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"
}

 

gowra1v Occasional Visitor
Occasional Visitor

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