N-central Help

Sample code

#!/usr/bin/perl -w
# This script calls the SOAP method " DeviceAssetInfoExport" on a SolarWinds N-central server.
# The data structure returned is printed to stdout using Data::Dumper.

use strict;
use SOAP::Lite;
use Data::Dumper;

my $NableServer = SOAP::Lite  ->uri("http://www.n-able.com/mickey")
                      ->proxy("http://integration1.n-able.com/dms/services/ServerEI");
my $functionName = " DeviceAssetInfoExport";
my $result = $NableServer->$functionName(
           SOAP::Data->name('Version' => SOAP::Data->type(string=>"1.0")),
           SOAP::Data->name('Username' => "username"),
           SOAP::Data->name('Password' => "password")
           );

unless ($result->fault) {
           my $deviceDataArray = $result->result();
           print Dumper($deviceDataArray) , "\n";
} else {
           print "Call returned fault\n";
           print $result->faultstring . "\n";
           exit 1;
}
exit 0;