NAME

IPsonar - Wrapper to interact with the Lumeta IPsonar API

VERSION

Version 0.13

SYNOPSIS

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

Code snippet.

use IPsonar;

my $rsn = Lumeta50API->new('rsn_address_or_name','username','password');
my $test_report = 1;
my @ip_list;

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

my $count = 0;
while (my $x = $rsn->next_result) {
    push @ip_list $x->{ip};
}

SUBROUTINES/METHODS

new (rsn, username, password)

Establish 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)

Establish connection to a report server using SSL certificate

$rsn->query ( method, hashref_of_parameters)

Issue a query (get results for non-paged queries) $rsn->query ( method, hashref_of_parameters)

$rsn->next_result ()

Get paged results

$rsn->error

Get error information