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

Page of 81
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) 
 
    
var
 credentials = 
new
 NetworkCredential(
Username
Password
Server
);
 
 
    remoteSetupService = 
new
 RemoteSetupService { Credentials = credentials };            
 
    
if
 (remoteSetupService.ExternalAPIVersionSoapHeaderValue == 
null
)
 
    {
 
        remoteSetupService.ExternalAPIVersionSoapHeaderValue = 
new
 
RemoteSetupServiceWS.ExternalAPIVersionSoapHeader();
 
    }
 
    remoteSetupService.ExternalAPIVersionSoapHeaderValue.ClientVersionIn = 15;
 
}
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 
 
    
var
 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.6)     
Page 70 of 81
Code examples
Remote setup API examples