Reports - Update Datasources In Group
Updates the data sources of the specified paginated report (RDL) from the specified workspace.
Important
Both the original data source and the new data source must have the exact same schema.
- The user must be the data source owner.
- This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.
Reports.ReadWrite.All
- Only supports paginated reports.
- Changing the data source type isn't supported.
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/Default.UpdateDatasources
Name | In | Required | Type | Description |
---|---|---|---|---|
group
|
path | True |
string uuid |
The workspace ID |
report
|
path | True |
string uuid |
The report ID |
Name | Required | Type | Description |
---|---|---|---|
updateDetails | True |
The update details for the data sources of the paginated report |
Name | Type | Description |
---|---|---|
200 OK |
OK |
Sample request
POST https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/reports/cfafbeb1-8037-4d0c-896e-a46fb27ff229/Default.UpdateDatasources
{
"updateDetails": [
{
"datasourceName": "SqlDatasource",
"connectionDetails": {
"server": "New-Sql-Server",
"database": "New-Sql-Database"
}
},
{
"datasourceName": "SqlAzureDatasource",
"connectionDetails": {
"server": "New-SqlAzure-Server.windows.net",
"database": "New-SqlAzure-Database"
}
}
]
}
Sample response
Name | Description |
---|---|
Rdl |
The connection details for a paginated report data source |
Update |
Update details for a paginated report data source |
Update |
A request to update the data sources of a paginated report |
The connection details for a paginated report data source
Name | Type | Description |
---|---|---|
database |
string |
The connection database |
server |
string |
The connection server |
Update details for a paginated report data source
Name | Type | Description |
---|---|---|
connectionDetails |
The new connection details for the paginated report data source |
|
datasourceName |
string |
The name of the paginated report data source |
A request to update the data sources of a paginated report
Name | Type | Description |
---|---|---|
updateDetails |
The update details for the data sources of the paginated report |