Cisco Cisco TelePresence Management Suite (TMS) Version 15 Developer's Guide

Page of 74
Remote setup API examples
The code snippet below demonstrates how to authenticate with the remote setup API.
public
 
void
 InitRemoteSetupService()
 
{
 
    
// Specify username and password to authenticate to service.
 
    
// (Can also be done in web.config) 
 
    NetworkCredential credentials = 
new
 NetworkCredential(
"username"
"password"
"domain"
);
 
 
    remoteSetupService = 
new
 RemoteSetupService { Credentials = credentials };            
 
    
if
 (remoteSetupService.ExternalAPIVersionSoapHeaderValue == 
null
)
 
    {
 
        remoteSetupService.ExternalAPIVersionSoapHeaderValue = 
new
 
RemoteSetupServiceWS.ExternalAPIVersionSoapHeader();
 
    }
 
    remoteSetupService.ExternalAPIVersionSoapHeaderValue.ClientVersionIn = 11;
 
}
The code snippet below demonstrates how to loop through all systems in Cisco TMS, and display 
information about each system.
public
 
void
 DisplaySystemInformation()
 
{
 
    InitRemoteSetupService();
 
    
// Get all systems from TMS 
 
    RemoteSetupServiceWS.TMSSystem[] tmsSystems = remoteSetupService.GetSystems(); 
 
    
// Loop through the systems and output information about each system 
foreach
 
(RemoteSetupServiceWS.TMSSystem tmsSystem 
in
 tmsSystems)
 
    {
 
        Console.Out.WriteLine(
"SystemId: "
 + tmsSystem + 
" System Name:"
 + tmsSystem.SystemName);
 
    }            
 
}
Cisco TelePresence Management Suite Extension Booking API Programming Reference Guide (14.4)     
Page 65 of 74
Code examples