ALM Site Administration API Type Library
CreateDomain Method
Creates a new domain and retrieves the domain properties.
Visual Basic
Public Function CreateDomain( _
   ByVal DomainName As String, _
   ByVal ContactName As String, _
   ByVal ContactEmail As String, _
   ByVal UserQuota As Long _
) As String
The domain name.
The contact name.
The contact email.
The user connection number quota. -1 indicates an unlimited number of connections.
Return Type

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

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

  • DOMAIN_ID    -    The domain ID.
  • DOMAIN_NAME    -    The domain name.
  • PASSWORD    -    Not in use.
  • ADMIN_PASSWORD    -    Not in use.
  • PHYSICAL_DIRECTORY    -    The physical directory of the domain.
  • COMPANY_NAME    -    The company name. (Not used by ALM.)
  • CONTACT_NAME    -    The contact name. (Not used by ALM.)
  • CONTACT_EMAIL    -    The contact email. (Not used by ALM.)
  • USERS_QUOTA    -    The maximum number of concurrent connections in all projects of the domain. -1 indicates an unlimited number of connections.
  • DEFECTS_QUOTA    -    Not in use.
  • PROJECTS_QUOTA    -    Not in use.
  • FILESYSTEM_QUOTA    -    Not in use.
  • USERS_VERSION    -    Not in use.
  • PROJECTS_LIST    -    The domain projects are in this list. (This list is always empty when creating a domain.)
Return Value Example
    <PASSWORD />
Private Sub CreateDomain()

'The following Visual Basic example creates a new domain.

    Dim sDomainName As String
    Dim sContactName As String
    Dim sContactEmail As String
    Dim sReply As String

    On Error GoTo err
    sDomainName = "MyNewDomain"
    sContactName = "" 'Generally not in use
    sContactEmail = "" 'Generally not in use

    sReply = m_SAClient.CreateDomain _
        (sDomainName, sContactName, sContactEmail, 500)
    MsgBox sReply
    Exit Sub

    MsgBox "Program failed:" + err.Description

End Sub
See Also