Skip to main content

Getting started - Login

This section describes how to get started with the Enterprise Manager .NET SDK. To help you better understand how to implement the available methods, a code sample and a readme file that describes the code are located in the <Enterprise Manager_Installation_Folder>/clients/dotnet folder.

  1. Create a project that references the AemRestClient.dll and Newtonsoft.Json.dll files
  2. Create the AemRestClient object using one of the following constructors:

    1. public AemRestClient(ICredentials credentials, string url = "https://localhost/attunityenterprisemanager", bool verifyCertificate = true);
      • credentials – See below.
      • url – The URL to the Qlik Enterprise Manager server. The URL must begin with "https".
      • verifyCertificate – See below.
    2. public AemRestClient(ICredentials credentials, string host, int port, string urlSuffix = "attunityenterprisemanager", bool verifyCertificate = true);
      • credentials – See below.
      • host – The machine on which Enterprise Manager is installed.
      • port – The Enterprise Manager server port (usually 443).
      • urlSuffix – The part of the Enterprise Manager URL that follows the host and port (usually attunityenterprisemanager).
      • verifyCertificate – See below.
Note:

When verifyCertificate is set to true there must be a valid certificate on the Enterprise Manager machine. When set to false, the Enterprise Manager client will not validate the server certificate.

Example 1: Connecting to Enterprise Manager using Active Directory

var credentials = new NetworkCredential

{

UserName = "USERNAME",

Password = "PASSWORD",

Domain = "DOMAIN"

};

_client = new AemRestClient(credentials, "localhost", 443, false);

Example 2: Connecting to Enterprise Manager using SAML

This must be specified without a username.

var credentials = new NetworkCredential

{

Password=<saml_assertion>

};

_client = new AemRestClient(credentials, "localhost", 443, false);

Where <saml_assertion> is the SAML assertion from a SAML IDP. This must be a URL encoded string containing the SAMLResponse parameter with a base64 encoded SAML assertion as its value. The string may also contain other parameters (for example, RelayState), but these parameters are ignored.

Syntax:

“SAMLResponse=<long_base_64_string>”

Example 3: Using client methods to Get/Set data on Qlik Enterprise Manager

After creating credentials and a client object, you can call the client methods to get/set data from Enterprise Manager using the public APIs.

Syntax:

_client.GetServerList()

_client.GetServerDetails(serverName)

_client.ExportTask(serverName, taskName);