- This line was added.
- This line was removed.
- Formatting was changed.
WHM API 1 outputs data in either JSON or XML format.
- 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.
Multiexcerpt include MultiExcerptName Long Warning PageWithExcerpt LIB:_XMLDeprecated
Basic return data
Both JSON and XML output return data as hashes or arrays of hashes. All WHM API 1 function output follows the following basic structure:
- A top-level hash contains the
metadatahashes. In XML output,
<result>tags wrap the top-level hash of output.
datahash contains the function's output parameters.
metadatahash contains the function's metadata parameters.
metadata hash includes the following output parameters:
|Metadata parameter||Type||Description||Possible values||Example|
|integer||The WHM API version.||For WHM API 1 functions, this value is always |
|string||A message of success, or a reason for failure.|
|Boolean||Whether the function succeeded.|
|string||The WHM API 1 function name.||Any WHM API 1 function's name.|
If the function returns a hash with a single key whose value is an array, the metadata will include the
accountsummary function's output is typical of WHM API 1 output: