Child pages
  • WHM API 1 Functions - convert_addon_fetch_domain_details

Versions Compared

Key

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

Description

Excerpt

This function retrieves domain data for an addon domain.

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_fetch_domain_details?api.version=1&domain=example.tld



Expand
titleXML API


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



Expand
titleCommand Line


Code Block
whmapi1 convert_addon_fetch_domain_details domain=example.tld

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

 


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"convert_addon_fetch_domain_details"
   },
   "data":{  
      "number_of_email_forwarders":0,
      "number_of_autoresponders":0,
      "number_of_domain_forwarders":0,
      "owner":"steve",
      "docroot":"/home/user1/public_html/example.tld",
      "ip":"192.168.0.1",
      "number_of_email_accounts":2
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <number_of_email_accounts>2</number_of_email_accounts>
        <number_of_autoresponders>0</number_of_autoresponders>
        <number_of_domain_forwarders>0</number_of_domain_forwarders>
        <owner>steve</owner>
        <ip>192.168.0.1</ip>
        <docroot>/home/user1/public_html/example.tld</docroot>
        <number_of_email_forwarders>0</number_of_email_forwarders>
    </data>
    <metadata>
        <command>convert_addon_fetch_domain_details</command>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The addon domain for which to retrieve details.

A valid addon domain. example.tld

Returns

Return

TypeDescriptionPossible valuesExample

number_of_email_accounts

integer

The number of the domain's email accounts.

A positive integer.

2

number_of_autorespondersintegerThe number of the domain's autoresponders.A positive integer.

0

number_of_domain_forwardersintegerThe number of the domain's domain forwarders.A positive integer.

0

number_of_email_forwardersintegerThe number of the domain's email forwarders.A positive integer.

0

docroot

string

The document root for the addon domain.

An absolute file path.

/home/user1/public_html/example.tld

ip

integer

The domain's IP address.

A valid IP address.192.168.0.1

owner

string

The addon domain owner's cPanel account username.

A valid string.user1