Save cPanel account's log archive settings

This function saves the account's log archive settings.

Note:

You must pass either the archive_logs or the prune_archives parameter.

SecurityBasicAuth
Request
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
Example: archive_logs=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
Example: prune_archive=1
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/LogManager/set_settings
Request samples
uapi --output=jsonpretty \
  --user=username \
  LogManager \
  set_settings
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "set_settings",
  • "module": "LogManager",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}