cPanel/StatsManager
cPanel module

StatsManager

2 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="StatsManager", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

get_configuration GET#

Returns weblog analyzers' configuration

This function lists the configuration of the web log anayzers for each domain on the cPanel account.

Important:

When you disable the WebServer role the system disables this function. For more information, read our How to Use Server Profiles documentation.

Note

Additional web log analyzer configuration such as if the user can edit their own configuration is provided in the metadata section of the return.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

analyzersarray<object>
List of log analyzer configuration objects for this domain. Only analyzers that are enabled for this user on the system are shown.
enabledinteger
Whether the analyzer is turned on or off for the domain. - 1 - the analyzer is enabled. - 0 - the analyzer is disabled. Note: This is the cumulative effect of the choices the server admin and user make.
One of: 1 0
enabled_by_userinteger
Whether the analyzer is turned on or off for the domain specifically by this user. - 1 - the analyzer is enabled by the user. - 0 - the analyzer is disabled by the user.
One of: 1 0
namestring
Name of the analyzer. It must be one of the following: - analog - Analog weblog analyzer. - awstats - AWStats weblog analyzer. - webalizer - The Webalizer weblog analyzer.
One of: analog awstats webalizer
domainstring
The domain.

save_configuration POST#

Save current user's weblog analyzers configuration

This function saves the users choice about which web log anayzers are enabled for each domain on their cPanel users account. If the log anayzers are controlled by the reseller or root account, the user cannot manage which log analyzers are enabled or disabled.

Important:

When you disable the WebServer role the system disables this function. For more information, read our How to Use Server Profiles documentation.

changesarray<any>Optional

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

analyzersarray<object>
List of log analyzer configuration objects for this domain
availableinteger
Whether the analyzer is turned on or off for the whole server. - 1 - the analyzer is enabled on the server. - 0 - the analyzer is disabled on the server.
One of: 1 0
enabledinteger
Whether the analyzer is turned on or off for the domain. - 1 - the analyzer is enabled. - 0 - the analyzer is disabled.
One of: 1 0
lockedinteger
Whether the analyzer can be turned on or off for the domain by the cPanel user. - 1 - the analyzer can be managed by the cPanel user. - 0 - the analyzer cannot be managed by the cPanel user. The reseller or root controls the configuration.
One of: 1 0
namestring
Name of the analyzer. It must be one of the following: - analog - Analog weblog analyzer. - awstats - AWStats weblog analyzer. - webalizer - The Webalizer weblog analyzer.
One of: analog awstats webalizer
domainstring
The domain.