# Return domain's hosting configuration

This function lists user data for a domain.

Important:

  This function retrieves data from the /var/cpanel/userdata/user/domain file, where user represents the cPanel account username and domain represents the domain.
  * Because aliases (parked domains) do not use a user data file, this function cannot query information for aliases. To retrieve information for an alias, specify the associated main or addon domain.
  * Due to differences in user data files, the function's actual output may not contain all of the returns that this document lists.

Endpoint: GET /DomainInfo/single_domain_data
Version: 11.136.0.4
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    The domain on the cPanel account.

Important:

Do not specify an alias (parked domain).
    Example: "example.com"

  - `hide_temporary_domains` (integer)
    Whether to hide temporary domains from the returned values.

* 1 — Return an error if the requested domain is a temporary domain.
* 0 — Return all domains, including the temporary domains.

Note:

If you set this parameter's value to 1 and the requested domain is temporary,
the function will return an error similar to the following example: Domain [example.com] is a temporary
domain and hide_temporary_domains is enabled.
    Enum: 1, 0

  - `return_https_redirect_status` (integer)
    Whether to return the secure redirect status of the addon domains.
* 1 - Return status.
* 0 - Do not return status.
    Enum: 0, 1

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "single_domain_data"

  - `module` (string)
    The name of the module called.
    Example: "DomainInfo"

  - `result` (object)

  - `result.data` (object)

  - `result.data.all_aliases_valid` (integer)
    Whether a valid SSL certificate exists on the domain's aliases.
* 1 - A valid SSL certificate exists on the aliases.
* 0 - A valid SSL certificate does not exist on the aliases.

Important:

This return only appears if you set the return_https_redirects_status parameter to 1.
    Enum: 0, 1

  - `result.data.can_https_redirect` (integer)
    Whether a valid SSL certificate exists or AutoSSL runs on the domain.
* 1 - A valid SSL certificate exists or AutoSSL runs.
* 0 - A valid SSL certificate does not exist, and AutoSSL does not run.

Important:

This return only appears if you set the return_https_redirects_status parameter to 1.
    Enum: 0, 1

  - `result.data.customlog` (object)
    An object containing Apache log information.

  - `result.data.customlog.domain` (string)
    The target log file's domain. An [Apache log](http://httpd.apache.org/docs/2.2/mod/mod_log_config.html) domain. Generally, this value is combined.
    Example: "combined"

  - `result.data.customlog.target` (string)
    The absolute path to the domain's log file.
    Example: "/usr/local/apache/domlogs/example.com"

  - `result.data.documentroot` (string)
    The absolute path to the domain's document root.
    Example: "/home/user/public_html/"

  - `result.data.domain` (string)
    The domain name on the cPanel account.
    Example: "example.com"

  - `result.data.group` (string)
    The domain's group name.
    Example: "user"

  - `result.data.hascgi` (integer)
    Whether CGI is enabled for the domain.
* 1 - Enabled.
* 0 - Disabled.
    Enum: 0, 1

  - `result.data.homedir` (string)
    The absolute path to the account's home directory.
    Example: "/home/user"

  - `result.data.ifmodulemodsuphpc` (object)
    An object containing information about PHP scripts and suPHP.

  - `result.data.ifmodulemodsuphpc.group` (string)
    If suPHP is enabled, the group that PHP scripts run as.
    Example: "user"

  - `result.data.ip` (string)
    The domain's IP address.
    Example: "192.168.0.128"

  - `result.data.is_https_redirecting` (integer)
    Whether the domain redirects to https.
* 1 - Redirects.
* 0 - Does not redirect.

Important:

This return only appears if you set the return_https_redirects_status parameter to 1.
    Enum: 0, 1

  - `result.data.is_temporary` (integer)
    Whether the domain is a temporary domain.
* 1 — The domain is temporary.
* 0 — The domain is not temporary.
    Enum: 0, 1

  - `result.data.options` (string)
    The Apache Options directive for the domain.
    Example: "ExecCGI Includes"

  - `result.data.owner` (string)
    The WHM account (root or a reseller) that owns the cPanel account.
    Example: "root"

  - `result.data.phpopenbasedirprotect` (integer)
    The domain's open_basedir setting.
* 1 - Enabled.
* 0 - Disabled.

Note:

In EasyApache 4, change this directive in the Editor Mode section of WHM's
[MultiPHP INI Editor](https://go.cpanel.net/whmdocsMultiPHPINIEditor) interface
(WHM >> Home >> Software >> MultiPHP INI Editor).
    Enum: 0, 1

  - `result.data.port` (integer)
    Apache's port to access the domain.
    Example: 80

  - `result.data.scriptalias` (object)
    An object containing CGI information.

  - `result.data.scriptalias.path` (string)
    The absolute path to the domain's CGI directory.
    Example: "/home/user/public_html/cgi-bin"

  - `result.data.scriptalias.url` (string)
    The domain's CGI directory.
    Example: "/cgi-bin/"

  - `result.data.serveradmin` (string)
    The domain's administrator's contact email address.
    Example: "webmaster@example.com"

  - `result.data.serveralias` (string)
    A space-separated list of the domain's aliases.
    Example: "parkeddomain.com www.parkeddomain.com www.example.com"

  - `result.data.servername` (string)
    The domain's identifier on the server.
    Example: "example.com"

  - `result.data.type` (string)
    The domain type.
* addon_domain - The domain is an addon domain.
* sub_domain - The domain is a subdomain.
* main_domain - The domain is the account's main domain.
* parked_domain - The domain is a parked domain (domain alias).
    Enum: "addon_domain", "sub_domain", "main_domain", "parked_domain"

  - `result.data.usecanonicalname` (string)
    The domain's Canonical Name (CNAME) setting.
* On - Use the CNAME.
* Off - Do not use the CNAME.
    Enum: "On", "Off"

  - `result.data.user` (string)
    The cPanel account's username.
    Example: "user"

  - `result.data.userdirprotect` (integer)
    The domain's [Apache mod_userdir Tweak](https://go.cpanel.net/whmdocsApachemod_userdirTweak) setting.
* 1 - Enabled.
* 0 - Disabled.
    Enum: 0, 1

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


