Description

This function generates bandwidth data for the specified day.


cPanel API 1 is deprecatedDo not use this function. Instead, we strongly recommend that you use the following newer function:


Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$bandwidth_data = $cpanel->api1('Bandwidth', 'displaybw', array('example.com', 'example.com', 'jan', '2014', 'subdomain.example.com') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $bandwidth_data = $cpliveapi->api1('Bandwidth', 'displaybw', ['example.com', 'example.com', 'jan', '2014', 'subdomain.example.com'] ); # Call the function.


<cpanel Module="Bandwidth::displaybw( $FORM('domain','target','month','year','subd') )">




cpapi1 --user=username Bandwidth displaybw example.com example.com jan 2014 subdomain.example.com



<td align="center" class="bwtdh1">
<b>1</b>
</td>
<td class="bwtd1">91</td>
<td class="bwtd1">1.65</td>
<td class="bwtd1">0.00</td>
<td class="bwtd1">0.00</td>
<td class="bwtd1">0.00</td>
<td class="bwtd1">6.26</td>
</tr>




Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain name.

A valid domain.example.com
targetstring

Required

The domain name.

The domain return's value.

This value must match the domain value. 


example.com
tmonthstring

Required

The month for which to retrieve bandwidth data.

The first three letters of a month's name, in English.jan
tyearinteger

Required

The year for which to retrieve bandwidth data, in four digit format.

The desired year.2014
subdstring

The subdomain for which to retrieve bandwidth data.

If you do not use this parameter, the function returns bandwidth data for all of the specified domain's subdomains.

A subdomain on the specified domain.subdomain.example.com
timezonestring

The timezone in which to report the data.

This parameter defaults to the domain's timezone.

A timezone in Olson tz name format.America/Chicago

Returns

This function returns HTML to display a table row of bandwidth data for the specified account. The table row includes one column of bandwidth data for each day of the specified month.