Guide to the LiveAPI System - LiveAPI Methods

Introduction

The LiveAPI system uses the following methods to interact with cPanel & WHM. Use these methods with either the LiveAPI PHP Class or the LiveAPI Perl Module.

  • For more information about methods in PHP classes, read php.net's Classes and Objects documentation.
  • For more information about methods in Perl, read  perl.org's perlobj documentation .

Methods

The LiveAPI system includes the following methods to interact with cPanel & WHM:

  • api() — The api() method executes a cPanel API 1 or cPanel API 2 function.
  • api1() — The api1() function executes a cPanel API 1 function.  For use information and examples, read our  Guide to cPanel API 1.

  • api2() — The api2() function executes a cPanel API 2 function.  For use information and examples, read our Guide to cPanel API 2.

  • cpanelfeature() — The cpanelfeature() method is a wrapper for the feature tag, which checks whether the authenticated user has access to a feature.
  • cpanelif() — The cpanelif() method is a wrapper for the cpanelif tag, which evaluates a cPanel variable or logic operator.
  • cpanellangprint() — The cpanellangprint() method is a wrapper for the deprecated lang system's langprinttag. This method is deprecated.

  • cpanelprint() — The cpanelprint() method returns  a cPanel variable's value. 
  • debug_log() — The debug_log() method writes data to the debugging log file.
  • debug_log_json() — The debug_log_json() method writes JSON data to the debugging log file.
  • end() — The end() method deconstructs the Cpanel::LiveAPI object and closes the connection to cPanel & WHM.
  • exec() — The exec() method executes a cPanel tag.
  • fetch() — The fetch() method is a wrapper to return a hash reference from the  cpanelprint()  function, which retrieves a cPanel variable. 
  • footer() — The footer() method calls the cPanel interface's footer.
  • get_debug_level() — The get_debug_level() method retrieves the current debug level.
  • get_debug_log() — The get_debug_log() method retrieves the debug log file's absolute path and filename.
  • get_result() — The get_result() method fetches the most recent data result node. This method is for the LiveAPI PHP Class only.
  • header() — The header() method calls the cPanel interface's header.
  • new() — The new() method instantiates the Cpanel::LiveAPI object.
  • set_debug() — The set_debug() method sets the amount of debug information to store in LiveAPI's debug log file.
  • uapi() — The uapi() function executes a UAPI function. 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....