For cPanel & WHM 11.44
(Home >> Development >> API Shell)
This feature allows you to run WHM API function calls interactively within the interface.
To enable this feature, you must select On for the cPanel & WHM API Shell (for developers) setting in WHM's Tweak Settings (Home >> System Configuration >> Tweak Settings).
The WHM API Shell is only available to the
root user and
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 call's documentation thoroughly before you use it in the API Shell, a script, or through any other method.
If you wish to see an example of the output from a specific function call that uses test data, read the Example section for that function call in our Guide to WHM API 1 documentation.
How to use the API Shell in WHM
To run a WHM API function, perform the following steps:
Select a version of WHM API.
- To learn more about each function, click WHM API v1 Documentation.
- Only WHM API version 1 is available through this interface.
From the v1 menu, select the function that you wish to test.
- Enter the keys that you wish to test, and their values.
- If you need to enter more keys and values, click Add.
- If you wish to filter, sort, or paginate the results, click Show Sort/Filter/Paginate Options.
- To select the first record to show from the results, select the number from the Index (0-based) of first result to show menu.
- 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.
- To filter the results, click Add in the Filters section of the interface.
- Specify the Field, the condition to apply to the Field (Contains, Begins With, Equals), and the Term to apply to the condition.
- To enter more filters, click Add.
- To sort the results, click Add in the Sorts section of the interface.
- Specify the Field, the conditions to apply to the Field (lexicographic, ipv4, numeric), and whether to Reverse the sort order.
- To enter more sort methods, click Add.
- Click Submit.
API call results
The results will appear in the API call response section of the interface.
You can view the results in Table view, Tree view, or the Raw response.
The Raw response separates the function call's response from the HTTP headers.