ESET MSP API Examples

The ESET MSP licensing API provides an interface for MSPs who want to integrate the ESET MSP (EMA/MLS) into their own existing monitoring and management tools without the need to use the web interface. You can use the API to perform any function available through the EMA portal.

Service endpoint: 

https://emaapi.eset.com/Services/v2015_1/MSPservice.svc 

Definition of the soap xml:

https://emaapi.eset.com/Services/v2015_1/MSPService.svc?singleWsdl

The $client variable is the web service. Add the following:

$client = new SoapClient("https://emaapi.eset.com/Services/v2015_1/MSPService.svc?singleWsdl");

The above code assumes you are going against the primary instance of the API. If not, the WSDL URL above should be replaced with whichever API version you are testing against.

The following C# code snippet will log you in to the MSP API service:

client = new MSPServiceClient(Properties.Settings.Default.MSPAPIEndpoint);

            LoginRequest loginRequest = new LoginRequest();

            LoginResponse loginResponse = null;
 

            loginRequest.Username = Properties.Settings.Default.MSPAPIUsername;

            loginRequest.Password = Properties.Settings.Default.MSPAPIPassword;
 

            loginResponse = client.Login(loginRequest);
 

            if(loginResponse.IsSuccess)

            {

                loginID = loginResponse.LoginID;

                token = loginResponse.Token;

                connect = true;

            }

For example code and reporting samples, see the following topic:

API reporting (example for license usage)