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 Shell
Run 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 value
- Click Show Sort/Filter/Paginate Options to filter, sort, or paginate the results
- 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.
- 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.
- 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.
- 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.
- 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.
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.
One must also note that the Raw response separates the API call’s response from the HTTP headers.