Return PHP preconfigured domains

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.

SecurityBasicAuth
Request
query Parameters
domain
required
string

A domain on the system.

Note:

  • You must pass either the system_default or domain parameters, or both.
  • You can pass this parameter multiple times.
  • You cannot pass the name of a parked domain.
Examples:
domain=domain=example.com domain=example2.com domain=example3.com
domain=example.com
system_default
required
integer

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_default or domain parameters, or both.
  • If you pass this parameter with a false value and do not also pass the domain parameter, the function returns an error.
Enum: 1 0
Example: system_default=1
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/php_get_impacted_domains
Request samples
whmapi1 --output=jsonpretty \
  php_get_impacted_domains \
  system_default='1' \
  domain='example.com'
Response samples
application/json
{
  • "data": {
    • "domains": [
      • "example.com",
      • "subdomain.example.com",
      • "example2.com"
      ]
    },
  • "metadata": {
    • "command": "php_get_impacted_domains",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}