5 functions, invoked through the cpanel_uapi tool.
scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Stats", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.
This function requires the _Bandwidth Stats_ feature. To enable this feature, use WHM's _Feature Manager_ interface (_WHM >> Home >> Packages >> Feature Manager_).
timezonestringOptional
The timezone in which to report the data, in Olson tz format. Note: This parameter defaults to the server's timezone.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
bytesinteger
The domain's bandwidth usage, in bytes.
domainstring
The domain for which to display bandwidth statistics. Note: The function only returns this value if the protocol return's value is http.
month_startinteger
The beginning of the report window.
protocolstring
The protocol for which to provide data. httpimapsmtppop3 * ftp
This function returns entries from a domain's error log.
domainstringRequired
The domain for which to return error log entries.
logstringOptional
The Apache log file to query. This parameter defaults to error. error - The /var/log/apache2/error_log file. suexec - The /var/log/apache2/suexec_log file.
maxlinesintegerOptional
The number of lines to retrieve from the error log.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
This function returns the daily AwStats statistics for a domain.
domainstringRequired
The domain to retrieve statistics for. Must be owned by the current cPanel user.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
domainstring
The domain associated with the returned daily stats.
statsobject
A map of date strings (YYYY-MM-DD) to daily statistics. Up to 45 days of history are returned. Gaps between the first available stat and yesterday are filled with zeros.