Κοινή χρήση μέσω


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.

Permissions

Required Scope

Reports.ReadWrite.All

Limitations

  • 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

URI Parameters

Name In Required Type Description
groupId
path True

string

uuid

The workspace ID

reportId
path True

string

uuid

The report ID

Request Body

Name Required Type Description
updateDetails True

UpdateRdlDatasourceDetails[]

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/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

Definitions

Name Description
RdlDatasourceConnectionDetails

The connection details for a paginated report data source

UpdateRdlDatasourceDetails

Update details for a paginated report data source

UpdateRdlDatasourcesRequest

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

RdlDatasourceConnectionDetails

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

UpdateRdlDatasourceDetails[]

The update details for the data sources of the paginated report