ALM Site Administration API Type Library
GetConnections Method
Description
Returns the properties of all connections to the server.
Syntax
Visual Basic
Public Function GetConnections() As String
Return Type

On success, returns an XML string containing the connection properties.

Return Value Details
The properties of the GetConnections XML return string:

  • LOGIN_SESSION_ID    -     The connection ID assigned when user authenticated.
  • PROJECT_SESSION_ID    -     The ID assigned when the user is logged on to this project.
  • DOMAIN          -    The domain name.
  • HOSTNAME      -    The server name.
  • PROJECT          -    The project name.
  • USERNAME      -    The user name.
  • CLIENTTYPE    -    The type of client logged on. For example, UI, OTA, or testing tool.
  • LOGINTIME      -    The login time.
  • HOSTNAME       -    The host name.
  • LASTACTION    -    The time of the last action.
  • LASTPING        -    The time of the last ping.
  • LOGINTIME      -    The time this connection was made.
  • DEFECTS          -    Defects module license usage.
  • TESTLAB           -    TestLab module license usage.
  • REQUIREMENTS -    Requirements module license usage.
Return Value Example
<?xml version="1.0"?>

<GetConnections>
<TDXItem>
     <LOGIN_SESSION_ID>125</LOGIN_SESSION_ID>
     <PROJECT_SESSION_ID>76</PROJECT_SESSION_ID>
     <DOMAIN>ELINA</DOMAIN>
     <HOSTNAME>qcHost1</HOSTNAME>
     <PROJECT>myProject</PROJECT>
     <USERNAME>emmaw</USERNAME>
     <LASTPING>2007-07-05 12:41:57</LASTPING>
     <LASTACTION>2007-07-05 12:41:57</LASTACTION>
     <LOGINTIME>2007-07-05 12:41:57</LOGINTIME>
     <CLIENTTYPE>ALM Client UI</CLIENTTYPE>
     <SESSION_DATA>
          <TDXItem>
               <USER_PASSWORD></USER_PASSWORD>
          </TDXItem>
     </SESSION_DATA>
     <REQUIREMENTS>1</REQUIREMENTS>
     <COMPONENTS>1</COMPONENTS>
     <TESTLAB>1</TESTLAB>
     <DEFECTS>1</DEFECTS>
</TDXItem>
<TDXItem>
     <LOGIN_SESSION_ID>126</LOGIN_SESSION_ID>
     <PROJECT_SESSION_ID>77</PROJECT_SESSION_ID>
     <DOMAIN>ANAT</DOMAIN>
     <HOSTNAME>qcHost2</HOSTNAME>
     <PROJECT>myProject2</PROJECT>
     <USERNAME>georgek</USERNAME>
     <LASTPING>2007-07-05 12:43:25</LASTPING>
     <LASTACTION>2007-07-05 12:43:25</LASTACTION>
     <LOGINTIME>2007-07-05 12:43:24</LOGINTIME>
     <CLIENTTYPE>ALM Client UI</CLIENTTYPE>
     <SESSION_DATA>
          <TDXItem>
              <USER_PASSWORD></USER_PASSWORD>
          </TDXItem>
     </SESSION_DATA>
     <REQUIREMENTS>1</REQUIREMENTS>
     <COMPONENTS>1</COMPONENTS>
     <TESTLAB>1</TESTLAB>
     <DEFECTS>1</DEFECTS>
     </TDXItem>
</GetConnections>

Example
Private Sub GetConnections()

'The following Visual Basic example gets all connections
' to a Quality Center server.
    Dim sReply As String
    On Error GoTo err
    sReply = m_SAClient.GetConnections
    MsgBox sReply
    Exit Sub
err:
    MsgBox "Program failed:" + err.Description
End Sub
See Also