# Return domain's PHP error logs

This function lists the website's PHP error log files with size
and last-modified metadata. It does not return file contents.

Endpoint: GET /LogManager/list_error_logs
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    A domain owned by the cPanel account.
    Example: "example.com"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "list_error_logs"

  - `module` (string)
    The name of the module called.
    Example: "LogManager"

  - `result` (object)

  - `result.data` (array)
    An array of objects describing the requested error logs.

  - `result.data.error` (string,null)
    An error message that describes why the system could not
return metadata for this log file.

  - `result.data.file_id` (string)
    The file_id value for each log file.

* php_fpm_error_log — The PHP FPM error log
  file located in the user's home directory
  under the logs/ subdirectory.
* docroot_error_log — The PHP error log
  file located in the website's document
  root directory.
* homedir_error_log — The home directory
  error log file located in the user's home
  directory.
    Enum: "php_fpm_error_log", "docroot_error_log", "homedir_error_log"

  - `result.data.modified_today` (integer)
    Whether the log file was last modified today
(server local time).

* 1 — The file was modified today.
* 0 — The file was not modified today.
    Enum: 1, 0

  - `result.data.mtime` (integer,null)
    The log file's last-modified time as a unix
timestamp.
    Example: 1778112083

  - `result.data.path` (string)
    The absolute path to the log file.
    Example: "/home/cpuser/logs/example_com.php.error.log"

  - `result.data.size` (integer,null)
    The log file's size, in bytes.
    Example: 4096

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    * 1 — Success.
* 0 — Failed. Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


