Using Guest Connection

Any introductory work with web service can be organized via a guest connection. To provide work of such connection, one should first save user credentials in the BI server registry that will be used for authorization. To do this, as an administrator start the PP.Util utility with the /save_creds  <repository id> /gc <user name> parameters. Working via a guest connection enables the user to execute operations for the objects, for which the user, which user credentials were saved, has access permissions.

After that the following moniker can be used to execute web service operations: "<repository id>!Guest!M". On the first access with this moniker a guest connection is created on the BI server. To execute operations that work with repository objects, an object moniker is formed by the same principle as on the regular connection: "<repository id>!Guest!M!<object id or key>".

It is not necessary to close the guest connection, it will be closed automatically after timeout determined in BI server settings is reached.

NOTE. On working with the guest connection the OpenMetabase and CloseMetabase operations are not used.

Example

The example of getting information about guest connection. If guest connection has not been created yet, it will be created automatically on executing the GetSystemInfo operation.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetSystemInfo xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
<metabase>
  <id>WAREHOUSE!Guest!M</id>
  </metabase>
  </tArg>
  </GetSystemInfo>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetSystemInfoResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <version xmlns="">Release 10.4.10052.0 Master x64</version>
  <release xmlns="">10.4</release>
  <platformInfo xmlns="">x64</platformInfo>
  <osType xmlns="">Windows</osType>
  <osInfo xmlns="">Windows 10 x64</osInfo>
  <metabaseSessionTimeout xmlns="">00:30:00.000</metabaseSessionTimeout>
  <metabaseStoreBinaryCount xmlns="">0</metabaseStoreBinaryCount>
  <metabaseLocale xmlns="">1049</metabaseLocale>
  <metabaseConnectionPoolMaxCount xmlns="">50</metabaseConnectionPoolMaxCount>
  </GetSystemInfoResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetSystemInfo" :
{
"tArg" :
{
"metabase" :
{
"id" : "WAREHOUSE!Guest!M"
}
}
}
}

JSON response:

{
"GetSystemInfoResult" :
{
"version" : "Release 10.4.10052.0 Master x64",
"release" : "10.4",
"platformInfo" : "x64",
"osType" : "Windows",
"osInfo" : "Windows 10 x64",
"metabaseSessionTimeout" : "00:30:00.000",
"metabaseStoreBinaryCount" : "0",
"metabaseLocale" : "1049",
"metabaseConnectionPoolMaxCount" : "50"
}
}
public static GetSystemInfoResult TestGuestConnect(string mbDefinitionId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetSystemInfo()
{
tArg = new GetSystemInfoArg()
{
metabase = new MbId() { id = mbDefinitionId + "!Guest!M" }
}
};
// Get web service information
var result = somClient.GetSystemInfo(tGet);
return result;
}

See also:

Connecting to Web Service | Setting Up Guest Login