Child pages
  • UAPI Functions - Stats::list_analog_by_month
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

This function displays a domain's Analog statistics.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Stats/list_analog_by_month?engine=webalizer&traffic=http


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get account statistics for all sites on the cPanel account.
$list_analog_by_month = $cpanel->uapi(
    'Stats', 'list_analog_by_month',
    array(
        'engine'    => 'webalizer',
        'traffic'   => 'http',
  )
);


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Get account statistics for all sites on the cPanel account.
my $list_analog_by_month = $cpliveapi->uapi(
    'Stats', 'list_analog_by_month',
    {
        'engine'   => 'webalizer',
        'traffic'  => 'http',
    }
);


Note:

For more information, read our Guide to the LiveAPI System.

 

 Command Line
uapi --user=username Stats list_analog_by_month engine=webalizer traffic=http


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
      
  },
  "data": [
	{
    	"path" : "/tmp/user/webalizer/index.html",
    	"ssl" : 1,
    	"domain" : "example.com"
		"all_domains" : "1"
	}
]	


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
enginestring

Required

The statistics engine.

  • webalizer 
  • analog 
webalizer
trafficinteger

The web traffic type.

This parameter defaults to http.

  • http 
  • ftp 
http

Returns

ReturnTypeDescriptionPossible valuesExample
pathstring

The filepath to the statistics file.

A valid filepath.

/tmp/user/webalizer/index.html
urlstringThe domain for which to display statistics.A domain on the cPanel account.example.com
  • No labels