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 returns a PHP version's assigned PHP handler.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_get_domain_handler
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_get_domain_handler
- 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_domain_handler?type=vhost&vhost=clearly.com'{ "apiversion": 3, "func": "php_get_domain_handler", "module": "LangPHP", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists domains that obtain their PHP version from a specified PHP configuration.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function.
A domain on the system.
Note:
- You must pass either the
system_defaultordomainparameters, or both. - You can pass this parameter multiple times.
- You cannot pass the name of a parked domain.
Whether to return domains that inherit the system's default PHP version.
1- Return domains that inherit the system's default PHP version.0- Do not return domains that inherit the system's default PHP version.
Note:
If you pass this parameter with a false value and do not also pass the domain parameter, the function returns an error.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_get_impacted_domains
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_get_impacted_domains
- 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_impacted_domains?domain=example.com&system_default=1'{ "apiversion": 3, "func": "php_get_impacted_domains", "module": "LangPHP", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists the system's PHP versions.
Note:
This document only applies to systems that run EasyApache 4.
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_get_installed_versions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_get_installed_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_installed_versions{ "apiversion": 3, "func": "php_get_installed_versions", "module": "LangPHP", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }