API Shell for WHM

Overview

This feature allows you to call WHM API functions interactively within the interface.

To enable this feature, you must enable the cPanel & WHM API Shell (for developers) setting in WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings).

Note:

 Only the root user and root-enabled resellers may use this feature.

Warning:

This feature uses live data from your server. API function calls may change or delete data on your server, which can cause your server to fail. Read each function's documentation thoroughly before you use it in the API Shell interface, a script, or through any other method.

Call a WHM API function

To call a WHM API function, perform the following steps:

  1. Select a version of the WHM API.

    Notes:

    • To learn more about each function, click WHM API v1 Documentation.
    • Only WHM API version 1 is available through this interface.
  2. From the v1 menu, select the function that you wish to test.

  3. Enter the input parameters that you wish to test, and their values.
    • To enter more parameters and values, click Add.
  4. To filter, sort, or paginate the results, click Show Sort/Filter/Paginate Options.
    1. To select the first record to show from the results, select the number from the Index (0-based) of first result to show menu.
    2. To limit the number of results that the interface displays, specify the maximum number of results that you wish to display in the Maximum # of results to show menu.
    3. To filter the results, click Add in the Filters section of the interface.
      • Enter the appropriate information in the Field text box, condition menu, and Term text box.
      • To enter more filters, click Add.
    4. To sort the results, click Add in the Sorts section of the interface.
      • Enter the appropriate information in the Field text box and condition menu, and select whether you wish to Reverse the sort order.
      • To enter more sort methods, click Add.
    5. To limit the columns to display, click Add in the Columns section of the interface.
      • Enter the appropriate information in the Column text box.
      • To enter more columns to display, click Add.
  5. Click Submit.

API call results

The system displays the results in the API call response section of the interface.

You can view the results under the TableTree, or Raw response tabs.

Note

 The Raw response separates the function call's response from the HTTP headers.

  • 5 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....