cPanel module
WebVhosts
2 functions, invoked through the cpanel_uapi tool.
scope cpanel:uapi
Call any function with
cpanel_uapi(service_id, module="WebVhosts", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.list_domains GET#
Return virtual host names for domains
This function lists virtual host names for each domain.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
domainstring
The domain name.
proxy_subdomainsarray<string>
An array of service subdomains (proxy subdomains) listed for the domain. Note: This only returns values when vhost_is_ssl equals 1.
vhost_is_sslinteger
Whether an SSL certificate secures the domain. 1 - Secured. 0 - Not secured.
One of: 0 1
vhost_namestring
The name of the virtual host.
list_ssl_capable_domains GET#
Return domains that allow SSL certificate purchase
This function lists every domain for which you may purchase an SSL certificate. The possible domains for the Secure Sockets Layer (SSL) certificate include applicable service subdomains.
hide_temporary_domainsintegerOptional
Whether to hide temporary domains from the returned values. 1 — Return an error if the requested domain is a temporary domain. 0 — Return all domains, including the temporary domains. Note: If you set this parameter's value to 1 and the requested domain is temporary, the function will return an error similar to the following example: Domain [example.com] is a temporary domain and hide_temporary_domains is enabled.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
domainstring
A valid domain name on the virtual host.
is_proxyinteger
Whether the system automatically created the service subdomain or a user manually created the domain. 1 - The system automatically created the service subdomain. 0 - A user manually created the domain. Note: If a user manually creates a subdomain that matches a preassigned subdomain (for example, cpanel or whm), then the function returns 0.
One of: 0 1
vhost_namestring
The name of the virtual host or website.