NAME

Net::BaruwaAPI - Perl bindings for Baruwa REST API

VERSION

Version 0.01

SYNOPSIS

Baruwa Enterprise Edition https://www.baruwa.com is a fully fledged Mail Security solution, based on best of breed open source software packages. It provides protection from spam, viruses, phishing attempts and malware.

This distribution provides easy methods to access Baruwa servers via the REST API.

Check https://www.baruwa.com/docs/api for more details of the REST API. Read Net::BaruwaAPI for API usage.

use Net::BaruwaAPI;
my $api = Net::BaruwaAPI->new(
    api_token => 'oauth token',
    api_url => 'https://baruwa.example.com/api/v1'
);

METHODS

get_users

my $data = $api->get_users();

get_user($userid)

my $data = $api->get_user($userid);

create_user($data)

my $data = $api->create_user($data);

update_user($data)

my $data = $api->update_user($data);

delete_user($data)

my $data = $api->delete_user($data);

set_user_passwd($userid, $data)

my $data = $api->set_user_passwd($userid, $data);

get_aliases($addressid)

my $data = $api->get_aliases($addressid);

create_alias($userid, $data)

my $data = $api->create_alias($userid, $data);

update_alias($addressid, $data)

my $data = $api->update_alias($addressid, $data);

delete_alias($addressid, $data)

my $data = $api->delete_alias($addressid, $data);

get_domains

my $data = $api->get_domains();

get_domain($domainid)

my $data = $api->get_domain($domainid);

create_domain($data)

my $data = $api->create_domain($data);

update_domain($domainid, $data)

my $data = $api->update_domain($domainid, $data);

delete_domain($domainid)

my $data = $api->delete_domain($domainid);

get_domainaliases($domainid)

my $data = $api->get_domainaliases($domainid);

get_domainalias($domainid, $aliasid)

my $data = $api->get_domainalias($domainid, $aliasid);

create_domainalias($domainid, $data)

my $data = $api->create_domainalias($domainid, $data);

update_domainalias($domainid, $aliasid, $data)

my $data = $api->update_domainalias($domainid, $aliasid, $data);

delete_domainalias($domainid, $aliasid, $data)

my $data = $api->delete_domainalias($domainid, $aliasid, $data);

get_deliveryservers($domainid)

my $data = $api->get_deliveryservers($domainid);

get_deliveryserver($domainid, $serverid)

my $data = $api->get_deliveryserver($domainid, $serverid);

create_deliveryserver($domainid, $data)

my $data = $api->create_deliveryserver($domainid, $data);

update_deliveryserver($domainid, $serverid, $data)

my $data = $api->update_deliveryserver($domainid, $serverid, $data);

delete_deliveryserver($domainid, $serverid, $data)

my $data = $api->delete_deliveryserver($domainid, $serverid, $data);

get_authservers($domainid)

my $data = $api->get_authservers($domainid);

get_authserver($domainid, $serverid)

my $data = $api->get_authserver($domainid, $serverid);

create_authserver($domainid, $data)

my $data = $api->create_authserver($domainid, $data);

update_authserver($domainid, $serverid, $data)

my $data = $api->update_authserver($domainid, $serverid, $data);

delete_authserver($domainid, $serverid, $data)

my $data = $api->delete_authserver($domainid, $serverid, $data);

get_ldapsettings($domainid, $serverid, $settingsid)

my $data = $api->get_ldapsettings($domainid, $serverid, $settingsid);

create_ldapsettings($domainid, $serverid, $data)

my $data = $api->create_ldapsettings($domainid, $serverid, $data);

update_ldapsettings($domainid, $serverid, $settingsid, $data)

my $data = $api->update_ldapsettings($domainid, $serverid, $settingsid, $data);

delete_ldapsettings($domainid, $serverid, $settingsid, $data)

my $data = $api->delete_ldapsettings($domainid, $serverid, $settingsid, $data);

get_radiussettings($domainid, $serverid, $settingsid)

my $data = $api->get_radiussettings($domainid, $serverid, $settingsid);

create_radiussettings($domainid, $serverid, $data)

my $data = $api->create_radiussettings($domainid, $serverid, $data);

update_radiussettings($domainid, $serverid, $settingsid, $data)

my $data = $api->update_radiussettings($domainid, $serverid, $settingsid, $data);

delete_radiussettings($domainid, $serverid, $settingsid, $data)

my $data = $api->delete_radiussettings($domainid, $serverid, $settingsid, $data);

get_organizations

my $data = $api->get_organizations();

get_organization($orgid)

my $data = $api->get_organization($orgid);

create_organization($data)

my $data = $api->create_organization($data);

update_organization($orgid, $data)

my $data = $api->update_organization($orgid, $data);

delete_organization($orgid)

my $data = $api->delete_organization($orgid);

get_relay($relayid)

my $data = $api->get_relay($relayid);

create_relay($orgid, $data)

my $data = $api->create_relay($orgid, $data);

update_relay($relayid, $data)

my $data = $api->update_relay($relayid, $data);

delete_relay($relayid, $data)

my $data = $api->delete_relay($relayid, $data);

get_status

my $data = $api->get_status();

AUTHOR

Andrew Colin Kissa, <andrew at topdog.za.net>

BUGS

Please report any bugs or feature requests to bug-net-baruwaapi at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-BaruwaAPI. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::BaruwaAPI

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2015 Andrew Colin Kissa.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.