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 system’s default PHP version.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_get_system_default_version
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_get_system_default_version
- 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/LangPHP/php_get_system_default_version{ "apiversion": 3, "func": "php_get_system_default_version", "module": "LangPHP", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function returns the PHP version of every virtual host that a reseller controls.
You can get the version of a single virtual host by providing an optional vhost name.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_get_vhost_versions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_get_vhost_versions
- 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/LangPHP/php_get_vhost_versions?vhost=your-domain.test'{ "apiversion": 3, "func": "php_get_vhost_versions", "module": "LangPHP", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function lists a virtual host's basic PHP directives. The Basic Mode section of cPanel's MultiPHP INI Editor interface (Home >> Software >> MultiPHP INI Editor) also lists these directives.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the WebServer role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_ini_get_user_basic_directives
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_ini_get_user_basic_directives
- 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/LangPHP/php_ini_get_user_basic_directives?type=vhost&vhost=clearly.com'{ "apiversion": 3, "func": "php_ini_get_user_basic_directives", "module": "LangPHP", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }