# List the addon domains

This function lists the cPanel account's addon domains: the domains that
are parked on a subdomain of the account's primary domain, rather than on
the primary domain itself.

Note:

Use the Park::listparkeddomains function for the domains parked on the
primary domain.

Endpoint: GET /AddonDomain/listaddondomains
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `regex` (string)
    A Perl regular expression. The system returns only the addon domains whose name matches this pattern, case-insensitively.
    Example: "addon[.]com$"

  - `return_https_redirect_status` (integer)
    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.
    Enum: 0, 1

## Response 200 fields (application/json):

  - `data` (array)
    One entry for each addon domain on the account, sorted by domain name.

  - `data.basedir` (string)
    The addon domain's document root, relative to the account's home directory.
    Example: "public_html/addon"

  - `data.can_https_redirect` (integer)
    Whether the system can redirect the addon domain to HTTPS. The system only returns this field when you pass the return_https_redirect_status parameter.
* 1 - The system can redirect the addon domain.
* 0 - The system cannot redirect the addon domain.
    Enum: 0, 1

  - `data.dir` (string)
    The absolute path to the addon domain's document root.
    Example: "/home/username/public_html/addon"

  - `data.domain` (string)
    The addon domain.
    Example: "addon.com"

  - `data.domainkey` (string)
    The subdomain that the addon domain is parked on, in the underscore-separated subdomain_rootdomain form. Pass this value as the subdomain parameter of the AddonDomain::deladdondomain function.
    Example: "addon_example.com"

  - `data.fullsubdomain` (string)
    The fully qualified name of the subdomain that the addon domain is parked on.
    Example: "addon.example.com"

  - `data.is_https_redirecting` (integer)
    Whether the system currently redirects the addon domain to HTTPS. The system only returns this field when you pass the return_https_redirect_status parameter.
* 1 - The system redirects the addon domain.
* 0 - The system does not redirect the addon domain.
    Enum: 0, 1

  - `data.reldir` (string)
    The addon domain's document root, relative to the account's home directory and prefixed with home:.
    Example: "home:public_html/addon"

  - `data.rootdomain` (string)
    The domain that the addon domain's subdomain belongs to.
    Example: "example.com"

  - `data.status` (string)
    The addon domain's rewrite status, or the URL that it redirects to.

  - `data.subdomain` (string)
    The label of the subdomain that the addon domain is parked on, without the root domain.
    Example: "addon"

  - `data.web_subdomain_aliases` (array)
    The built-in service subdomain aliases, for example www, that the system serves for the addon domain.

  - `errors` (array,null)

  - `messages` (array,null)

  - `metadata` (object)

  - `metadata.transformed` (integer)

  - `status` (integer)
    * 1 — Success.
* 0 — Failed. Check the errors field for more details.
    Enum: 0, 1

  - `warnings` (array,null)


