Child pages
  • cPanel API 1 Functions - Bandwidth::displayday

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function generates bandwidth graphs for the specified day.

Warning
titleWarning:

We removed this function in cPanel & WHM version 11.52. We strongly recommend that you use the following UAPI function instead of this function:

  • UAPI (recommended)Bandwidth::query
    Excerpt Include
    UAPI Functions - Bandwidth::query
    UAPI Functions - Bandwidth::query
    nopaneltrue
Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$daily_bandwidth_graph = $cpanel->api1('Bandwidth', 'displayday', array('example.com', '1', '2014', '25') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

 

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $daily_bandwidth_graph = $cpliveapi->api1('Bandwidth', 'displayday', ['example.com', '1', '2014', '25'] ); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="Bandwidth::displaybw( $FORM('domain','tmonth','tyear','tday') )">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username Bandwidth displayday example.com 1 2014 25 subdomain.example.com

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

Expand
titleOutput (images)

This function opens multiple bandwidth graph images in the web browser.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain name.

Any valid domain.example.com
targetstring

The system does not use this parameter, and will ignore the value.

A placeholder value.''
tmonthinteger

The month for which to generate bandwidth graphs.

This parameter defaults to the current month.

An integer between 1 and 12 that corresponds to a month of the year.1
tyearinteger

The year for which to generate bandwidth graphs.

This parameter defaults to the current year.

The four digits for the desired year.2014
tdateinteger

The day of the month for which to generate bandwidth graphs.

This parameter defaults to the current day.

An integer between 1 and 31 that corresponds to a day of the month.25
subdBoolean

The type of bandwidth graphs.

This parameter defaults to 0.

  • 1 — Displays graphs for all traffic and for HTTP traffic.
  • 0 — Displays graphs for all traffic, HTTP, SMTP, FTP, POP3, and IMAP.
0

Returns

This function opens multiple bandwidth graph images in the web browser.