NAME
   Opsview::REST - Interface to the Opsview REST API

SYNOPSIS
       use Opsview::REST;

       my $ops = Opsview::REST->new(
           base_url => 'http://opsview.example.com/rest',
           user     => 'username',
           pass     => 'password',
       );

       # These are equivalent
       my $status = $ops->get('/status/hostgroup?hostgroupid=1&...');
       my $status = $ops->status(
           'hostgroup',
           'hostgroupid' => [1, 2],
           'filter'      => 'unhandled',
           ...
       );

DESCRIPTION
   Opsview::REST is a set of modules to access the Opsview REST API, which
   is the recommended method for scripting configuration changes or any
   other form of integration since version 3.9.0

METHODS
 new
   Return an instance of the Opsview::REST.

  Required Arguments
   base_url
       Base url where the REST API resides. By default it is under "/rest".

   user
   pass
       Username and password needed to login.

 get($url)
   Makes a "GET" request to the API. The response is properly deserialized
   and returned as a Perl data structure.

 status( $endpoint, [ %args ] )
   Convenience method to request the "status" part of the API. $endpoint is
   the endpoint to send the query to. %args is a hash which will get
   properly translated to URL arguments.

   More info:
   <http://docs.opsview.com/doku.php?id=opsview-community:restapi:status>

 downtimes
 create_downtime( %args )
 delete_downtime( [ %args ] )
   Downtime related methods.

   More info:
   <http://docs.opsview.com/doku.php?id=opsview-community:restapi:downtimes
   >

SEE ALSO
   *   <http://www.opsview.org/>

   *   Opsview REST API Documentation
       <http://docs.opsview.com/doku.php?id=opsview-community:restapi>

AUTHOR
   *   Miquel Ruiz <[email protected]>

COPYRIGHT AND LICENSE
   This software is copyright (c) 2012 by Miquel Ruiz.

   This is free software; you can redistribute it and/or modify it under
   the same terms as the Perl 5 programming language system itself.