Reports - Update Datasources
Updates the data sources of the specified paginated report (RDL) from My workspace.
Important
Both the original data source and the new data source must have the exact same schema.
Permissions
The user must be the data source owner.
Required Scope
Reports.ReadWrite.All
Limitations
Only supports paginated reports.
Changing the data source type isn't supported.
Open Database Connectivity (ODBC) aren't supported.
POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/Default.UpdateDatasources
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
report
|
path | True |
string (uuid) |
The report ID |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| updateDetails | True |
The update details for the data sources of the paginated report |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
Examples
Example
Sample request
POST https://api.powerbi.com/v1.0/myorg/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
Definitions
| 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 |
RdlDatasourceConnectionDetails
The connection details for a paginated report data source
| Name | Type | Description |
|---|---|---|
| database |
string |
The connection database |
| server |
string |
The connection server |
UpdateRdlDatasourceDetails
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 |
UpdateRdlDatasourcesRequest
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 |