WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
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 } }
Request
This function returns the system default PHP version.
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_system_default_version
- A server running WHM.
https://whm-server.tld:2087/json-api/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/whm.openapi/php_get_system_default_version{ "data": { "version": "ea-php56" }, "metadata": { "command": "php_get_system_default_version", "reason": "Ok", "result": 1, "version": 1 } }