We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • UAPI Functions - StatsManager::get_configuration
Skip to end of metadata
Go to start of metadata

Description

This function lists the configuration of the weblog analyzers for each domain on the cPanel account.

Important:

In cPanel & WHM version 76 and later, when you disable the Web Server role, the system disables this function.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/StatsManager/get_configuration


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.
 
// Retrieves statistics program status
$getstats = $cpanel->uapi(
    'StatsMananger', 'get_configuration'
);


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.
 
# Retrieves statistics program status
my $getstats = $cpliveapi->uapi(
    'StatsMananger', 'get_configuration',
);


Note:

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


 Command Line
uapi --user=username StatsMananger get_configuration


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)
{
	"errors": null,
	"metadata": {
		"transformed": 1,
		"analyzers": [{
			"name": "analog",
			"available_for_user": 1,
			"enabled_by_default": 1
		}, {
			"available_for_user": 1,
			"enabled_by_default": 1,
			"name": "awstats"
		}, {
			"enabled_by_default": 1,
			"available_for_user": 1,
			"name": "webalizer"
		}],
		"locked": 1
	},
	"status": 1,
	"data": [{
		"analyzers": [{
			"name": "analog",
			"enabled": 1,
			"enabled_by_user": 0
		}, {
			"enabled_by_user": 0,
			"enabled": 1,
			"name": "awstats"
		}, {
			"enabled_by_user": 0,
			"enabled": 1,
			"name": "webalizer"
		}],
		"domain": "example.com"
	}],
	"warnings": null,
	"messages": null
}


Note:

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

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
domain string

The domain to report the weblog analyzer configuration.

A domain on the cPanel account. example.com

analyzers

array of hashes

The weblog analyzer's configuration on the cPanel account.

This array contains the enabledenabled_by_user, and name returns.

enabled

 
Boolean

Whether the weblog analyzer is enabled.

This function returns this value in the analyzers array.

  • 1  — Enabled.
  • 0 — Disabled.
1

enabled_by_user

 
Boolean

Whether the cPanel user can enabled weblog analyzer.

This function returns this value in the analyzers array.

  • 1  — Enabled.
  • 0 — Disabled.
1

name

 
string

The name of the weblog analyzer.

This function returns this value in the analyzers array.

  • awstats
  • analog
  • webalizer

awstats

Non-Standard Metadata

Note:

The following information returns in the function's metadata section. The data is system-level information about whether the reseller or root user allows the weblog analyzers.


ReturnTypeDescriptionPossible valuesExample

analyzers

array of hashesThe system-level weblog analyzer's configuration for the cPanel account.This array contains the available_for_user, enabled_by_default, and name returns.

available_for_user

 
Boolean

Whether the reseller or root user enabled the weblog analyzer for the cPanel account.

This function returns this value in the analyzers array.

  • 1 — Enabled.
  • 0 — Disabled.

1

enabled_by_default

 
Boolean

Whether the reseller or root user enabled the weblog analyzer by default.

This function returns this value in the analyzers array.

  • 1  — Enabled.
  • 0 — Disabled.
1

name

 
string

The name of the weblog analyzer.

This function returns this value in the analyzers array.

  • awstats
  • analog
  • webalizer

awstats

locked

 
BooleanWhether the cPanel user can manage weblog analyzer.
  • 1 — No.
  • 0 — Yes.

1