You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

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 Web Server role, the system disables this function.

Examples 


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


Notes:

  • Unless otherwise noted, 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":"exampleparent",
      "docroot":"/home/exampleparent/public_html/example.com",
      "ip":"192.0.2.0",
      "has_ssl_cert_installed":0,
      "is_sni_supported":1,
      "has_dedicated_ip":0,
      "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>exampleparent</owner>
        <ip>192.0.2.0</ip>
        <docroot>/home/exampleparent/public_html/example.com</docroot>
        <number_of_email_forwarders>0</number_of_email_forwarders>
      	<has_ssl_cert_installed>0</has_ssl_cert_installed>
      	<is_sni_supported>1</is_sni_supported>
      	<has_dedicated_ip>0</has_dedicated_ip>
    </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.com

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/exampleparent/public_html/example.com

ip

integer

The domain's IP address.

A valid IP address.192.0.2.0

owner

string

The addon domain owner's cPanel account username.

A valid string.exampleparent
has_ssl_cert_installedBooleanWhether an SSL certificate secures the domain.
  • 1 — An SSL certificate secures the domain.
  • 0 — An SSL certificate does not secure the domain.
0 
has_dedicated_ipBooleanWhether the domain uses a dedicated IP address.
  • 1 —  The domain uses a dedicated IP address.
  • 0 — The domain does not use a dedicated IP address.
0 
is_sni_supportedBooleanWhether the domain supports SNI (Server Name Indication).
  • 1 — The domain supports SNI.
  • 0 — The domain does not support SNI.
0