v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
DomainInfo
Domain Information

Return all domains' hosting configuration

This function lists user data for the cPanel account's domains.

Note:

This function retrieves data from the /var/cpanel/userdata/user/domain file, where user represents the cPanel account username and domain represents the domain. For this reason, actual output may not contain all of the returns that this document lists.

get/DomainInfo/domains_data

Query parameters

format'hash' | 'list'
Example:hash

The function's return format.

  • hash — Use a hash format. The function will return objects based on the domain type.
  • list — Use a list format. The function will return an array of objects, where each object is a domain.
hide_temporary_domains1 | 0
Example:1

Whether to hide temporary domains from the response arrays.

  • 1 — Hide temporary domains from addon_domains, sub_domains, and parked_domains arrays.
  • 0 — Return all domains, including the temporary domains.
return_https_redirects_status1 | 0
Example:1

Whether to return the secure redirect status of the addon domains.

  • 1 — Return the status.
  • 0 — Do not return the status.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "domains_data",
  "module": "DomainInfo",
  "result": {
    "status": 1
  }
}