WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function returns the PHP handlers on the system.
Important:
When you disable the Web Server role, the system disables this function.
An installed PHP version.
ea-php54ea-php55ea-php56ea-php70ea-php71ea-php72inherit- Any custom PHP package name.
Important:
We deprecated PHP 5.6 and PHP 7.0 and will remove them in a future version. For more information, read our cPanel Deprecation Plan documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_get_handlers
- A server running WHM.
https://whm-server.tld:2087/json-api/php_get_handlers
- 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/whm.openapi/php_get_handlers?version=ea-php72'{ "data": { "version_handlers": [ … ] }, "metadata": { "command": "php_get_handlers", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists domains that obtain their PHP version from a specified PHP configuration.
Important:
When you disable the Web Server 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:
- You must pass either the
system_defaultordomainparameters, or both. - If you pass this parameter with a false value and do not also pass the
domainparameter, the function returns an error.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_get_impacted_domains
- A server running WHM.
https://whm-server.tld:2087/json-api/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/whm.openapi/php_get_impacted_domains?domain=string&system_default=1'{ "data": { "domains": [ … ] }, "metadata": { "command": "php_get_impacted_domains", "reason": "OK", "result": 1, "version": 1 } }
Request
This function returns the installed PHP versions on a server.
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/whm.openapi/php_get_installed_versions
- A server running WHM.
https://whm-server.tld:2087/json-api/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/whm.openapi/php_get_installed_versions{ "data": { "versions": [ … ] }, "metadata": { "command": "php_get_installed_versions", "reason": "Ok", "result": 1, "version": 1 } }