UAPI - Custom UAPI Modules

Introduction

You can add custom modules to cPanel & WHM and call them with UAPI.

Warning:

Make certain that you thoroughly test custom modules before you attempt to add them to production servers.

Steps to create a custom module

To create a custom module and add it to cPanel & WHM's UAPI, perform the following steps:

  1. Create a Perl module.

    • Save your custom module as the /usr/local/cpanel/Cpanel/API/Module.pm file, where Module is the custom module's name.

      Warning:

      cPanel & WHM treats all of the modules in the /usr/local/cpanel/Cpanel/API/ directory as UAPI modules. 

      • We recommend that you only save module files (.pm) to this location.
      • The presence of other files may cause problems, even if the files relate to your custom modules.
    • UAPI modules reside in the Cpanel::API namespace.
  2. Add functions to your module.
    • A single module generally contains many functions.
    • You can cause functions to only work with certain feature lists.
  3. Thoroughly test your module on a non-production server.
  • 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....