WebService::Uptrack - access KSplice Uptrack web API
This document describes WebService::Uptrack version 0.0.2
use WebService::Uptrack; my( $uptrack ) = WebService::Uptrack->new( credentials => { user => 'username', key => 'uptrack-API-key', }, ); my( $machines ) = $uptrack->machines; foreach my $machine ( keys( %{$machines} ) ) { my( $uuid ) = $machine->{uuid}; my( $status ) = $uptrack->describe( $uuid ); };
This module provides a Perl interface to the KSplice Uptrack web API. API documentation is located here:
http://www.ksplice.com/uptrack/api
You need to provide a valid Uptrack API username and key in order to use this module; get this via the Uptrack web interface.
Instantiate a new WebService::Uptrack object. You must provide your credentials as a hashref with the following format:
WebService::Uptrack
{ user => 'username', key => 'api-key', }
You can pass the following additional parameters at creation time:
url is a string, defining the top-level API URL. By default it's set to https://uptrack.ksplice.com/api.
url
https://uptrack.ksplice.com/api
debug is an integer; if it's set greater than 0, WebService::Uptrack will emit debug info via Carp.
debug
_ua must be a reference to a LWP::UserAgent object or something that works the same.
_ua
_json must be a reference to a JSON::XS object or something that works the same.
_json
The machines API call. Consult the upstream documentation for specifics.
machines
The describe API call. Consult the upstream documentation for specifics.
describe
The authorize API call. Consult the upstream documentation for specifics.
authorize
Carp, Data::Dumper, Readonly, Moose, Moose::Util::TypeConstraints, MooseX::StrictConstructor, HTTP::Request, HTTP::Response, LWP::UserAgent, JSON::XS
None reported.
No bugs have been reported.
Please report any bugs or feature requests to bug-webservice-uptrack@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-webservice-uptrack@rt.cpan.org
Thanks to KSplice for making their API straightforward and easy to use, and thanks to The Harvard-MIT Data Center (http://www.hmdc.harvard.edu) for employing me while I write this module.
Steve Huff <shuff at cpan dot org>
<shuff at cpan dot org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install WebService::Uptrack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Uptrack
CPAN shell
perl -MCPAN -e shell install WebService::Uptrack
For more information on module installation, please visit the detailed CPAN module installation guide.