BlockIP
2 functions, invoked through the cpanel_uapi tool.
cpanel_uapi(service_id, module="BlockIP", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.add_ip GET#
Add IP address to cPanel account's block list
This function blocks IP addresses from accessing the domains on a cPanel account.
Important
When you disable the Web Server role, the system disables this function.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
IP addresses that were added, as translated by the system.
remove_ip GET#
Remove IP address from cPanel account's block list
This function unblocks IP addresses from accessing domains on a cPanel account.
Important
When you disable the Web Server role, the system disables this function.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
The IP addresses that the function removed, and the system translated.