v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Stats
Domain Statistics

Return specified domain access log

This function returns entries from a domain's error log.

get/Stats/get_site_errors

Query parameters

domainstring domain required
Example:example.com

The domain for which to return error log entries.

log'error' | 'suexec'
Example:suexec

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.
maxlinesinteger
Example:250

The number of lines to retrieve from the error log.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "get_site_errors",
  "module": "Stats",
  "result": {
    "data": [
      {
        "date": 1234576704,
        "entry": "[Fri Feb 13 19:58:24.420593 2009] [core:error] [pid 29228:tid 47876185720577] (13)Permission denied: [client 10.0.0.2:62908] AH00132: file permissions deny server access: /home/user/public_html/index.html"
      }
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}