For cPanel & WHM 11.44
(Home >> Advanced >> API Shell)
This feature allows you to run cPanel API function calls interactively within the interface.
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 the documentation for a function call 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 UAPI and Guide to cPanel API 2 documentation.
Enable the cPanel API Shell
If you wish to use this feature and your system administrators have not enabled it for you, ask them to perform the following steps in WHM:
- Select On for the cPanel & WHM API Shell (for developers) setting in the System tab of WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings).
- Grant the API Shell feature to the desired users in WHM's Feature Manager interface (Home >> Packages >> Feature Manager).
Run a cPanel API function
To run a cPanel API function, perform the following steps:
Select the API that you wish to use.
- Select the API call that you wish to test from the menu.
- Enter the keys and values that you wish to test.
- 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 to display, select 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.
- You can specify the field by which you wish to filter the results, the conditions, and the Term to apply to the conditions.
- To use more than one filter, click Add for each additional filter that you wish to specify.
- To sort the results, click Add in the Sorts section of the interface.
- You can specify the field by which you wish to sort the results, the conditions, and whether you wish to reverse the sort order.
- To use more than one sort method, click Add for each additional sort method that you wish to specify.
- 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 API call's response from the HTTP headers.