This function returns the built-in subdomain aliases for an account's main domain.
Note:
This function retrieves data from the /var/cpanel/userdata/user/domain
file, where user
represents the cPanel account username and domain
represents the domain. For this reason, actual output may not contain all of the returns that this document lists.
uapi --output=jsonpretty \ --user=username \ DomainInfo \ main_domain_builtin_subdomain_aliases
{- "apiversion": 3,
- "func": "main_domain_builtin_subdomain_aliases",
- "module": "DomainInfo",
- "result": {
- "data": [
- "mail",
- "www"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}