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

Description

This function retrieves domain data for an addon domain.

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_fetch_domain_details?api.version=1&domain=example.tld
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/convert_addon_fetch_domain_details?api.version=1&domain=example.tld
 Command Line
whmapi1 convert_addon_fetch_domain_details domain=example.tld


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,
      "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
   }
}
 Output (XML)
<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>


Note:

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

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