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.
To be able to use the Enterprise Manager .NET SDK:
- Create a project that references the AemRestClient.dll and Newtonsoft.Json.dll files
-
Create the AemRestClient object using one of the following constructors:
- 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.
- 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.
- public AemRestClient(ICredentials credentials, string url = "https://localhost/attunityenterprisemanager", bool verifyCertificate = true);
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: 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);