WHM API 0 outputs data in either JSON or XML format. The output format depends on the options that you choose when you call the function.
- Extensible Markup Language (XML) requires additional computational resources, and has complex requirements that can cause difficulty during the development process. This API's XML output is not compliant with XML standards, and it may result in validation errors.
- Calls for XML API output will return a deprecation warning.
- We plan to remove XML output entirely in a future version of cPanel & WHM.
For more information, read our cPanel Deprecation Plan documentation.
WHM API 0 is deprecated. We strongly recommend that you only use the equivalent WHM API 1 functions instead.
Basic return data
Both JSON and XML output return data as hashes or arrays of hashes. In XML output,
<functionname> tags wrap the top-level hash of data, where
functionname is the function's name.
The top-level hash of data includes a hash of the function's output data, as well as the function's metadata.
- In the following examples, the output data is in the
- The output data's hash's name varies from function to function.
- Check the desired function's documentation for an accurate outline of the output's structure.
accountsummary function returns typical WHM API 0 output: