Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

API - Update Datasources not changing report data

Hi,

I'm trying to use the "Datasets - Update Datasources In Group" API endpoint to remap the datasources of reports hosted on the Power BI server between different SQL Server databases. I submit the following JSON as part of the call:

    json_content = {
        "updateDetails": [
        {

            "datasourceSelector": {
                "datasourceType": "Sql",
                "connectionDetails": {
                    "server": "<current server>",
                    "database": "<current DB>"
                    }
                },
            "connectionDetails": {
                "server": "<target server>",
                "database": "<target DB>"
                },
            "datasourceId": "<target_datasource_ID>",
            "datasourceType": "Sql",
            "gatewayId": "<target_gateway_ID>"
            }
        ]
    }

and when I check the datasource via the "Datasets - Get Datasources In Group" it seems to have remapped successfully. However, this doesn't seem to be reflected in the report data. I have tried refreshing the report both manually in the server UI and via the dataset refresh API endpoint. Is there something I'm missing in getting the datasource update to carry through to the report data?
Thanks

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.