This string includes the properties used to connect with HTTP header authentication. HTTP header authentication can only be used to authenticate with the S/4HANA sandbox hosted at https://api.sap.com.

jdbc:datadirect:s4hana:ServerName=servername;AuthenticationMethod=HttpHeader;AuthHeader=api_key;
SecurityToken=security_token;[property=value[;...]];

where:

servername
specifies the URL of the S/4HANA sandbox instance: https://api.sap.com.
api_key
specifies the API key used to connect to your SAP S/4HANA service.
security_token
specifies the token used to connect to your SAP S/4HANA service.
property=value
specifies connection property settings. Multiple properties are separated by a semi-colon.

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

Connection conn = DriverManager.getConnection
    ("jdbc:datadirect:s4hana:ServerName=https://api.sap.com;
    AuthenticationMethod=HttpHeader;AuthHeader=APIKey;
    SecurityToken=du1ZCRNJI0rANDc3pKxJ3AZTX0MxKexK;");