# Save cPanel account's log archive settings

This function saves the account's log archive settings.

Note:

You must pass at least one of the archive_logs, prune_archive, or retention_days parameters.

Endpoint: GET /LogManager/set_settings
Version: 11.136.0.13
Security: BasicAuth

## Query parameters:

  - `archive_logs` (integer)
    Whether to archive log files to your home directory after the
system processes statistics.
* 1 — Archive the logs.
* 0 — Do not archive the logs.

Note:

* This parameter defaults to the archive-logs setting's value in the user's ~/.cpanel-logs file.
* If this file does not exist, this parameter defaults to the default_archive-logs key's value in the cpanel.config file.
    Enum: 0, 1

  - `prune_archive` (integer)
    Whether to remove the previous month's archived logs from the ~/logs directory at the end of each month.
* 1 — Remove the logs.
* 0 — Do not remove the logs.

Note:

* This parameter defaults to the remove-old-archived-logs setting's value in the user's ~/.cpanel-logs file.
* If this file doesn't exist, this parameter defaults to the default_remove-old-archive-logs key's value in the cpanel.config file.
    Enum: 0, 1

  - `retention_days` (integer)
    The number of days to retain archived log files before automatic removal.
* 0 — Retain logs indefinitely.
* -1 — Clear the per-user override and revert to the server default.
* Any positive integer — Retain logs for that many days.

When not provided, the existing value is preserved.
    Example: 30

## Response 200 fields (application/json):

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

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

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

  - `result` (object)

  - `result.data` (any)

  - `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.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

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


