Child pages
  • WHM API 1 Functions - convert_addon_list_addon_domains
Skip to end of metadata
Go to start of metadata

Description

This function returns a list of addon domains that belong to the current user.

Important:

In cPanel & WHM version 76 and later, when you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

Examples 



 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/convert_addon_list_addon_domains?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/convert_addon_list_addon_domains?api.version=1
 Command Line
whmapi1 convert_addon_list_addon_domains


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{  
   "metadata":{  
      "version":1,
      "command":"convert_addon_list_addon_domains",
      "result":1,
      "reason":"OK"
   },
   "data":{  
      "example.tld":{  
         "domain_type":"addon",
         "docroot":"/home/user1/public_html/example.tld",
         "subdomain":"example.user1.tld",
         "ip":"192.168.0.1",
         "owner":"user1",
         "reseller":"user1",
         "ipv6":"2001:db8:a0b:12f0::1"
      }
   }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <command>convert_addon_list_addon_domains</command>
        <reason>OK</reason>
    </metadata>
    <data>
        <example.tld>
            <subdomain>example.user1.tld</subdomain>
            <docroot>/home/user1/public_html/example.tld</docroot>
            <reseller>user1</reseller>
            <ipv6>2001:db8:a0b:12f0::1</ipv6>
            <domain_type>addon</domain_type>
            <ip>192.168.0.1</ip>
            <owner>user1</owner>
        </example.tld>
    </data>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

Return

TypeDescriptionPossible valuesExample

domain_name*

hash

A hash of the domain's data.

Note:

The domain's name is the return's name.

This hash includes the subdomain, docroot, reseller, ipv6, domaintype, ip, and owner returns.

 

subdomain

string

The domain's subdomain.

The function returns this value in the domain_name hash.

A valid string.

example.user1.tld

docroot

string

The document root for the addon domain.

The function returns this value in the domain _name hash.

An absolute file path.

/home/user1/public_html/example.tld

reseller

string

The domain's reseller.

The function returns this value in the domain _name hash.

A valid string.user1

ipv6

string

The domain's IPv6 address.

The function returns this value in the domain _name hash.

A valid IPv6 address. 2001:db8:a0b:12f0::1

domaintype

string

The domain's type.

The function returns this value in the domain _name hash.

A valid string.addon

ip

integer

The domain's IPv4 address.

The function returns this value in the domain _name hash.

A valid IPv4 address. 192.168.0.1

owner

string

The domain's owner.

The function returns this value in the domain _name hash.

A valid string. user1