Get db IDs dynamically

Hello Team,

How to get list of global id’s information for specific database ? I want to implement dynamic DB switching, I want to switch the connectionID based on the loggedin org.

Thanks,
Snow.

Hi,
In some cases we may need to get globalID’s information dynamically , in those cases (Ex: while implementing dynamic DB switching) we can get the globalid’s , data source name etc information from this API

Request Type : GET

http://:8085/bi-ee//listDataSources?driver=com.mysql.jdbc.Driver&databaseDialect=mysql&name=Mysql&categoryName=RDBMS&categoryType=rdbms&type=global.jdbc&dataSourceProvider=tomcat&classifier=global&j_username=hiadmin&j_password=hdiadmin

Note : Based on the database we should provide respective Driver,Dialect,name etc

we should pass credentials in the get request

The API will gives JSON Array as response , we should extract required information like globalID, data source name

image

Thank You,
Helical Insight.