Forum Discussion
jmillar
Helper I
6 years agoHow can I determine which datasets are using a gateway connection?
We're moving some servers around, and I'd like to know if there's a way to determine which datasets are using a specific gateway connection and/or if there's a way to change the server for a gateway ...
GilbertQ
Super User
6 years agoHi there
THis API will tell you which data sources are for which datasets. It also contains the GatewayID which will relate to your Gateway.
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/datasets_getdatasourcesasadmin
This will give you the Gateway details:
https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/getgateways
This one might be the one to update the data sources
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasourcesingroup
THis API will tell you which data sources are for which datasets. It also contains the GatewayID which will relate to your Gateway.
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/datasets_getdatasourcesasadmin
This will give you the Gateway details:
https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/getgateways
This one might be the one to update the data sources
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasourcesingroup
jmillar
Helper I
6 years agoThat's great info, thanks! -- I haven't played much with the API yet. I'm assuming I need to register an app before I have access to the REST APIs? Is that approach appropriate even for internal ad-hoc utilities, etc., that aren't an app in the traditional sense (e.g. it'd be an internal "app" meant only for administrator and to query items that the above that can't readily be seen via the Service UI).
J
- cperuski6 years ago
Advocate II
Were you able to successfully get the gateway information? And if so, what were the steps you followed? I'm totally out of my element with APIs. Thanks
- GilbertQ6 years ago
Super User
The way to do it manually is to go into each dataset, then click on Gateway Connection, it will show you which gateway it is using.