Forum Discussion
Update Existing GatewayId/DatasourceId to Paginated Report using REST API
- 4 years ago
I've got the solution by calling the method to update the data source api twice.
Previously, I called this method: https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group
But due to my report was connected to multiple gateways with the same connection string and credentials.
So, I have to:
- remove the duplicate data source which my report doesn't use - https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/delete-datasource
- call the update data sources in group twice - https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group
- first one: calling to update the database to 'tempDB' or the database name that is not the same as the correct one.
- 2nd: calling to update to the correct one.
At first, I've only called to update to the correct one, but I think the report has already binded to that connection details, so the power bi won't re-map the data source/gateway to us.
I've got the solution by calling the method to update the data source api twice.
Previously, I called this method: https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group
But due to my report was connected to multiple gateways with the same connection string and credentials.
So, I have to:
- remove the duplicate data source which my report doesn't use - https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/delete-datasource
- call the update data sources in group twice - https://docs.microsoft.com/en-us/rest/api/power-bi/reports/update-datasources-in-group
- first one: calling to update the database to 'tempDB' or the database name that is not the same as the correct one.
- 2nd: calling to update to the correct one.
At first, I've only called to update to the correct one, but I think the report has already binded to that connection details, so the power bi won't re-map the data source/gateway to us.
It is not working for me. Can you provide me with more details or a code snippet?
Regards