Sample code
The SOAP API is now classed as a legacy system. While we won’t be adding new features or functionality, we will maintain its availability and provide ongoing support. We recommend using our REST API for new calls and when updating existing SOAP calls. For more information, please visit our REST API documentation.
#!/usr/bin/perl -w
# This script calls the SOAP method " DeviceAssetInfoExport" on a N-able 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;
Updated about 2 months ago