This string includes the properties used to connect with basic authentication.

jdbc:datadirect:teamcity:ServerName=server_name;User=user_name;
Password=password;property=value[;...]];

where:

server_name
specifies the URL of the TeamCity service to which you want to issue requests. For example, https://teamcity.company.com for enterprise accounts.
user_name
specifies the user name that is used to connect to the TeamCity service. For example, jsmith.
password
specifies the password used to connect to your TeamCity service.
property=value
specifies connection property settings. Multiple properties are separated by a semi-colon.
Note: The User and Password properties are not required to be stored in the connection string. They can also be passed separately by the application.

The following example connection string includes the properties required for connecting with basic authentication.

Connection conn = DriverManager.getConnection
  ("jdbc:datadirect:teamcity:ServerName=teamcity.company.com;
   AuthenticationMethod=Basic;User=jsmith;Password=secret;");