It seems like your browser didn't download the required fonts. Please revise your security settings and try again.

End-of-Sale/Renewals for Models 100 and 200

As of October 4th, 2020, new sales for models 100 and 200 of the Barracuda Email Security Gateway ceased. As of November 30, 2023, renewals for models 100 and 200 of the Barracuda Email Security Gateway have ceased. 

General APIs

  • Last updated on

The API interfaces presented in this section are general in that they are applicable to the Barracuda Email Security Gateway as well as to other Barracuda Networks appliances. The examples presented here are specific to the Barracuda Email Security Gateway.

Example: Config.get

Use this method to retrieve values of variables in the system configuration. If the variable requested has only a single value (Spam Tag Configuration Subject Tag level, for example), the output will be different than the output for a variable that contains a list (users, domains, etc.). This method gets the value of the variable in the object of $type named $path. The return $value is a reference to an array if it is multi-valued, i.e. a list.

Refer to the example in Single Value Response for getting a variable with a single value and to Multi-value Response for getting a variable that contains a list. Arguments to the method can be specified by just adding the parameter in the XML request.

Parameters Allowed

The following variables are used with the config.get method. These variables should be provided as part of the request XML in the HTTP POST request.

  • variable – A required parameter that tells the API which variable to return.
  • password – A required parameter which the API uses to authenticate access to a page and which is set by your administrator.
  • type – A required parameter that specifies the class/scope of a variable.
  • path – A required parameter that is the qualified name of an object for which the value is required. Note that the value for path is an empty string for getting a variable under global scope.

Get the Value of a Variable under Global Scope - System Alerts Email Address

Getting the current value of a system variable uses the config.get method. This example gets the value of the System Alerts Email Address variable, typically set from the BASIC > Administration page.

  • type: 'global'
  • variable: alerts_email_address

The name of the variable, alerts_email_address, is shown in the <input_id>, to the right of Update_.


XML Code for this Example

Note that the name tag indicates that the API applies to a single variable in the configuration. The value tag indicates that the expected value of that variable is a string, and takes the variable name noted above, alerts_email_address, as the input.

<?xml version="1.0" encoding="UTF8"?>
Perl Code for this Example

Be sure to use single quotes to surround literal values in your calls, and use double quotes to surround variables.

use strict;
use warnings;
use XML::RPC;
# IP Address of your Barracuda Web Filter
my $cuda_ip = "";
# API Password
my $password = "1234";
my $url = "  http://$cuda_ip:8000/cgi-mod/api.cgi?password=$password  ";
#Create the XML::RPC object
my $xmlrpc = XML::RPC->new ($url);
my $result;
$result = $xmlrpc->call ('config.get',
          type => 'global',
          variable => 'alerts_email_address',
# show the response from the Barracuda Web Filter
print "--- RESPONSE ---";
print $xmlrpc->xml_in();
XML Response Returned by Perl Script

Here is the XML response returned after running the above Perl script, returning as the System Alerts Email Address


For more examples, see Config.get and Config.get - Tied Variable Examples.