UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LogManager/get_settings
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LogManager/get_settings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LogManager/get_settings{ "apiversion": 3, "func": "get_settings", "module": "LogManager", "result": { "data": { … }, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LogManager/list_archives
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LogManager/list_archives
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LogManager/list_archives{ "apiversion": 3, "func": "list_archives", "module": "LogManager", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
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-logssetting's value in the user's~/.cpanel-logsfile. - If this file does not exist, this parameter defaults to the
default_archive-logskey's value in thecpanel.configfile.
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-logssetting's value in the user's~/.cpanel-logsfile. - If this file doesn't exist, this parameter defaults to the
default_remove-old-archive-logskey's value in thecpanel.configfile.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LogManager/set_settings
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LogManager/set_settings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LogManager/set_settings?archive_logs=1&prune_archive=1'{ "apiversion": 3, "func": "set_settings", "module": "LogManager", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }