Navigation:  USING THE API > 3.3 WORKING WITH DATA SOURCES >

3.3.1 Example: Retrieving the list of Data Sources

Previous page Next page
  rev. 2007-12-04        

The following example shows how to retrieve the list of data sources currently in boss.

// get the list of data sources

ManagingEnergy.Data.DataSource[] dataSources = api.GetDataSources();

             

// display the data source names

foreach (ManagingEnergy.Data.DataSource source in dataSources)

  Console.WriteLine(source.UserFriendlyName);        

 

// OUTPUT

Auma

Development

Greenwin

Internal

Niagara Health

Profac

Prospects

Springfield

Template

THESI  

NOTE

As mentioned in the previous section, the list of Data Sources will depend on the user’s privilege when running within a secure context. In such a case, only those Data Sources the user has access to will be returned.



3.3.1_Example_Retrieving_the_l         ©2017 Managing Energy Inc.