NAME

IPsonar - Wrapper to interact with the Lumeta IPsonar API

VERSION

Version 0.17

SYNOPSIS

This module wraps the IPsonar RESTful API. It handles the paging and https stuff so you can concentrate on extracting information from reports.

"Lumeta" and "IPsonar" are both registered trademarks of the Lumeta Coporation

EXAMPLE

Script to get all the IP address for all the devices that have
port 23 open:

my $rsn = IPsonar->new('rsn_address_or_name','username','password');
my $test_report = 23;

my $results = $rsn->query('detail.devices',
    {
        'q.f.report.id'                 =>  $test_report,
        'q.f.servicediscovery.ports'    =>  23,
    }) or die "Problem ".$rsn->error;

while (my $x = $rsn->next_result) {
   print "IP: $x->{ip}\n";
}

SUBROUTINES/METHODS

new (rsn, username, password)

Setup a connection to a report server using username / password Note: This doesn't actually initiate a connection until you issue a query.

new_with_cert (rsn, path_to_cert, password)

Setup a connection to a report server using SSL certificate Note: This doesn't actually initiate a connection until you issue a query.

$rsn->query ( method, hashref_of_parameters)

Issue a query (get results for non-paged queries). If you're getting back paged data we'll return the number of items available in the query. If we're getting back a single result we return a hashref to those results.

$rsn->next_result ()

Get next paged results as a hashref. Returns 0 when we've got no more results.

Note: Currently, we always return a hashref to the same (only) non-paged results.

$rsn->error

Get error information