SubDomain
List the subdomains
This function lists the subdomains on the cPanel account, including the subdomains that the account's addon domains are parked on.
get/SubDomain/listsubdomains
Query parameters
regexstring
Example:^shop
A Perl regular expression. The system returns only the subdomains whose fully qualified name matches this pattern, case-insensitively.
If this value is not a valid Perl regular expression, the function fails and reports the error in the errors field.
return_https_redirect_status0 | 1
Example:1
Whether to include the can_https_redirect and is_https_redirecting fields in each entry.
- 1 - Include the HTTPS redirect status.
- 0 - Omit the HTTPS redirect status.
Response
HTTP Request was successful.
Example response
{
"data": [
{
"basedir": "public_html/shop",
"can_https_redirect": 1,
"dir": "/home/username/public_html/shop",
"domain": "shop.example.com",
"domainkey": "shop_example.com",
"reldir": "home:public_html/shop",
"rootdomain": "example.com",
"subdomain": "shop"
}
],
"status": 1
}