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/
Request
This function lists the configuration of the web log anayzers for each domain on the cPanel account.
Important:
When you disable the WebServer role the system disables this function. For more information, read our How to Use Server Profiles documentation.
Note
Additional web log analyzer configuration such as if the user can edit their own configuration is provided in the metadata section of the return.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/StatsManager/get_configuration
- A server running cPanel.
https://cpanel-server.tld:2083/execute/StatsManager/get_configuration
- 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/StatsManager/get_configuration{ "apiversion": 3, "func": "get_configuration", "module": "StatsManager", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function saves the users choice about which web log anayzers are enabled for each domain on their cPanel users account. If the log anayzers are controlled by the reseller or root account, the user cannot manage which log analyzers are enabled or disabled.
Important:
When you disable the WebServer role the system disables this function. For more information, read our How to Use Server Profiles documentation.
List of domains and what web log analyzers to change.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/StatsManager/save_configuration
- A server running cPanel.
https://cpanel-server.tld:2083/execute/StatsManager/save_configuration
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/StatsManager/save_configuration \
-H 'Content-Type: application/json' \
-d '{
"changes": [
{
"analyzers": [
{
"enabled": 1,
"name": "awstats"
},
{
"enabled": 0,
"name": "analog"
},
{
"enabled": 0,
"name": "webalizer"
}
],
"domain": "domain.com"
}
]
}'{ "apiversion": 3, "func": "save_configuration", "module": "StatsManager", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }