BuycPanel Blog

BuycPanel Blog

Latest news and updates

Executing cPanel API Functions Interactively

Posted by Allura on 09 04 2019.

A Brief Introduction
This interface equips you to run cPanel API functions interactively.Enabling the cPanel API Shell
It is of absolute importance that your system administrators must enable it, for you to use this feature. Command it to perform the following steps in WHM:In the Systemtab of WHM’s Tweak Settings interface, Select On for the cPanel & WHM API Shell (for developers) setting (WHM >> Home >> Server Configuration >> Tweak Settings).
Grant the API Shell feature in WHM’s Feature Manager Interface, to the desired users (WHM >> Home >> Packages >> Feature Manager).
It is imperative that you mustuse a reseller account to access the API ShellRun a cPanel API function
Perform the following steps to run a cPanel API functions:Select the API you want to use.
Select the API function that you want to test from the menu.
Enter the keys and values that you want to test.Click Add to enter more keys and valueClick Show Sort/Filter/Paginate Options to…

A Brief Introduction

This interface equips you to run cPanel API functions interactively.

Enabling the cPanel API Shell

It is of absolute importance that your system administrators must enable it, for you to use this feature. Command it to perform the following steps in WHM:

  1. In the Systemtab of WHM’s Tweak Settings interface, Select On for the cPanel & WHM API Shell (for developers) setting (WHM >> Home >> Server Configuration >> Tweak Settings).
  2. Grant the API Shell feature in WHM’s Feature Manager Interface, to the desired users (WHM >> Home >> Packages >> Feature Manager).
  3. It is imperative that you mustuse a reseller account to access the API Shell

Run a cPanel API function

Perform the following steps to run a cPanel API functions:

  1. Select the API you want to use.
  2. Select the API function that you want to test from the menu.
  3. Enter the keys and values that you want to test.

Click Add to enter more keys and value

  1. Click Show Sort/Filter/Paginate Options to filter, sort, or paginate the results
  2. Enter the number in the Index of first result to show or zero-based text box to select the first record to show from the results or you can use the menu to select the number.
  3. Enter the maximum number of results in the Maximum # of results to show text box or use the menu to select the number, to limit the number of results to display.
  4. Click Add in the Filters section of the interface to filter the results.
  • You can specify the field by which you want to filter the results, the conditions, and the Term to apply to the conditions.
  • Click Add for each additional filter that you wish to specify to use more than one filter.
  1. Click Add in the Sorts section of the interface to sort the results.
  • You have the option to specify the field by which you want to sort the results, the conditions, and whether you want to reverse the sort order.
  • Click Add for each additional sort method that you wish to specify to use more than one sort method.
  1. Click Add in the Columns section of the interface to limit the columns to display.
  • Enter the column number in the Column text box.
  • Click Add to specify more columns to display.
  1. Click

API Call Results

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

You have the option to view the results in Table view, Tree view, or the Raw response.

 

Concluding Note

One must also note that the Raw response separates the API call’s response from the HTTP headers.