Below is the example of using the OpenMetabase operation to connect to a repository using the current domain user. The request contains only identifier of the description that contains settings for the repository connection. The response contains the repository connection moniker.
{
"OpenMetabase" :
{
"tDef" :
{
"id" : "WAREHOUSE_DOMAIN"
},
"tCreds" :
{
"pass" : ""
},
"tArg" : ""
}
}
{
"OpenMetabaseResult" :
{
"id" : "JINPKNBLFFHGGOAEMPGHKFFGDJMMFMGEIKMPMPCCPADDPPHJ!M",
"sessKey" : "150248",
"sessCookie" : "C2",
"version" : "166",
"defLocale" : "1049",
"driver" : "2"
}
}
public static MbId IntegratedDomainConnect(string mbDefinitionId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenMetabase()
{
tArg = new OpenMetabaseArg() { },
// Empty credentials, instead of which domain user credentials will be sent
tCreds = new UserCreds() { pass = "" },
tDef = new MbDef() // Description of repository, to which connection is established
{
id = mbDefinitionId
}
};
// Repository connection
MbId mb = somClient.OpenMetabase(tOpen);
return mb;
}
See also: