WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
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 } }
Request
This function returns the PHP version of every virtual host that a reseller controls.
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_vhost_versions
- A server running WHM.
https://whm-server.tld:2087/json-api/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/whm.openapi/php_get_vhost_versions{ "data": { "versions": [ … ] }, "metadata": { "command": "php_get_vhost_versions", "reason": "OK", "result": 1, "version": 1 } }