Description
This function lists the cPanel account's domains.
Note:
For this function to succeed, the /var/cpanel/userdata/username/main
file (where username
represents the authenticated user)must possess the correct permissions. If a permissions error occurs, this function returns blank values for all of its returns and doesnot return an error message.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
This function does not accept parameters.
Returns
Note:
For this function to succeed, the /var/cpanel/userdata/username/main
file (where username
represents the authenticated user)must possess the correct permissions. If a permissions error occurs, this function returns blank values for all of its returns and doesnot return an error message.
Return |
Type |
Description |
Possible values |
Example |
addon_domains |
array |
An array of addon domains. |
An array of string values that lists the addon domains on the cPanel account. |
addondomain.com |
sub_domains |
array |
An array of subdomains. |
An array of string values that lists the subdomains on the cPanel account. |
subdomain.example.com |
parked_domains |
array |
An array of parked domains. |
An array of string values that lists the parked domains on the cPanel account. |
parkeddomain.com |