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.
uapi --output=jsonpretty \ --user=username \ DomainInfo \ single_domain_data \ domain='example.com'
{- "apiversion": 3,
- "func": "single_domain_data",
- "module": "DomainInfo",
- "result": {
- "data": {
- "all_aliases_valid": 0,
- "can_https_redirect": 0,
- "customlog": {
- "domain": "combined",
- "target": "/usr/local/apache/domlogs/example.com"
}, - "documentroot": "/home/user/public_html/",
- "domain": "example.com",
- "group": "user",
- "hascgi": 1,
- "homedir": "/home/user",
- "ifmodulemodsuphpc": {
- "group": "user"
}, - "ip": "192.168.0.128",
- "is_https_redirecting": 0,
- "options": "ExecCGI Includes",
- "owner": "root",
- "phpopenbasedirprotect": 1,
- "port": 80,
- "scriptalias": {
- "path": "/home/user/public_html/cgi-bin",
- "url": "/cgi-bin/"
}, - "serveradmin": "webmaster@example.com",
- "serveralias": "parkeddomain.com www.parkeddomain.com www.example.com",
- "servername": "example.com",
- "type": "main_domain",
- "usecanonicalname": "Off",
- "user": "user",
- "userdirprotect": 1
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}