Child pages
  • WHM API 1 Functions - convert_addon_list_addon_domains

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledWebServerRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 




Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/convert_addon_list_addon_domains?api.version=1



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/convert_addon_list_addon_domains?api.version=1



Expand
titleCommand Line


Code Block
whmapi1 convert_addon_list_addon_domains

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "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"
      }
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<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>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

This function does not accept parameters.

Returns

Return

TypeDescriptionPossible valuesExample

domain_name*

hash

A hash of the domain's data.

Note
titleNote:

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