Reports - Update Datasources

Updates the datasources of the specified paginated report from "My Workspace". (Preview)

Important: The original datasource and the new datasource must have the exact same schema.
Required scope: Reports.ReadWrite.All
To set the permissions scope, see Register an app.

Restrictions

  • This operation is only supported for the datasource owner
  • Update datasources supports only paginated reports
  • Changing datasource type is not supported

POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/Default.UpdateDatasources

URI Parameters

Name In Required Type Description
reportId
path True
  • string
uuid

The report id

Request Body

Name Required Type Description
updateDetails True

The paginated report datasources update details.

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

RdlDatasourceConnectionDetails

A paginated report datasource connection details.

UpdateRdlDatasourceDetails

The new connection details and the target datasource name to be updated.

UpdateRdlDatasourcesRequest

A paginated report datasources update request.

RdlDatasourceConnectionDetails

A paginated report datasource connection details.

Name Type Description
database
  • string

The connection database.

server
  • string

The connection server.

UpdateRdlDatasourceDetails

The new connection details and the target datasource name to be updated.

Name Type Description
connectionDetails

The new server and database name.

datasourceName
  • string

The target datasource name to be updated.

UpdateRdlDatasourcesRequest

A paginated report datasources update request.

Name Type Description
updateDetails

The paginated report datasources update details.