Batch
1 functions, invoked through the cpanel_uapi tool.
Run multiple UAPI calls in one request via command-N params; always mutating; enumerate constituent calls first
cpanel_uapi(service_id, module="Batch", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.strict GET mutating#
Run multiple UAPI functions in order
This function combines calls for multiple UAPI functions and performs them in order.
Note:
- 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.
JetHost note: each command parameter is one JSON-encoded [module, function, params] triple; submit several by indexing the parameter name command-0, command-1, command-2, … (unindexed command is fine for a single call). Worked example — two calls run in order:
- command-0 = ["Email","list_pops",{}]
- command-1 = ["DNS","parse_zone",{"zone":"example.com"}]
Batch::strict is always treated as mutating regardless of which constituent calls are read-only, so enumerate every constituent [module, function, params] call to the user before running the batch — the caller cannot see inside the JSON-encoded command values otherwise.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of: