UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
A server running cPanel.
https://{host}:{port}/execute/
- 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_archivesResponse
application/json
{ "apiversion": 3, "func": "list_archives", "module": "LogManager", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Query
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.
Enum01
Example: archive_logs=1
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.
Enum01
Example: prune_archive=1
- 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'Response
application/json
{ "apiversion": 3, "func": "set_settings", "module": "LogManager", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }