DomainLookup
Return a domain's document root
This function retrieves the document root for a single domain on the cPanel account.
Note:
If the domain does not exist on the account, the system returns the account's public_html directory rather than an error.
get/DomainLookup/getdocroot
Query parameters
domainstring domain
Example:example.com
The domain to look up. The system converts this value to lowercase.
Omit this parameter to retrieve the document root for the account's primary domain.
Response
HTTP Request was successful.
Example response
{
"data": [
{
"docroot": "/home/username/public_html",
"reldocroot": "public_html"
}
],
"status": 1
}