You can find our user documentation at

Check out our new API beta site!

Child pages
  • Guide to the LiveAPI System - The fetch() Method
Skip to end of metadata
Go to start of metadata


The fetch() method is a wrapper to return a hash reference from the cpanelprint() function, which retrieves a cPanel variable.


  • We deprecated this method in cPanel & WHM version 88.
  • To return a data result for a cPanel variable's value, use the cpanelprint() method. 


LiveAPI PHP Class

// Get a hashref of the cPanel account's username.

LiveAPI Perl Module

# Get a hashref of the cPanel account's username.


ParameterTypeDescriptionPossible valuesExample
variablestringA cPanel variable.

A valid cPanel variable.


For a full list of cPanel variables, read our Guide to cPanel Variables



This method returns the cPanel variable's value as a hash reference.