Description
This function combines calls for multiple UAPI functions and performs them in order.
Notes:
- If a function call in the list fails, the
Batch::strict
function does not run further function calls in the list. - Due to the potential length of calls of this function, we recommend that you use the HTTP POST method for extremely long batch commands.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
||
command |
string |
Required A UAPI function to call. Important To submit multiple commands via Template Toolkit or the PHP Library, which require that you submit arguments in a hash, increment the parameter name. For example: command-0, command-1, command-2 It is not necessary to increment thecommand parameter label for query string calls of this function. |
Any UAPI function. Include the function's URI-encoded input parameters as a JSON-encoded array after the module and function name. For example, to call the PasswdStrength::get_required_strength function with an app parameter value of webdisk, assign the following value to a command parameter:
For reference, the non-URI-encoded version is:
|
|
Returns
Return |
Type |
Description |
Possible values |
Example |
|
array of hashes |
An array of hashes that contain function output. |
This array includes the result hash. |
|
result |
hash |
The results from a function. The function returns this hash in the unnamed array of hashes. |
Each result hash contains the output data and metadata from one of the command parameter's functions. |