We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - unset_all_service_proxy_backends
Skip to end of metadata
Go to start of metadata

Description

This function removes a cPanel account's service proxying.

Note:

  • If the WebServer role is active on the server, this function rebuilds the cPanel user's web virtual hosts (vhosts) and restarts the web server. For more information about server roles, read our How to Use Server Profiles documentation.
  • If the system cannot rebuild the cPanel user's vhosts, the API call will still succeed. However, the function returns a failure warning in the metadata.
  • To set a service proxying for a cPanel account, use the WHM API 1 set_service_proxy_backends function.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/unset_all_service_proxy_backends?api.version=1&username=example
 Command Line
whmapi1 unset_all_service_proxy_backends username=example


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
	"metadata": {
		"version": 1,
		"result": 1,
		"reason": "OK",
		"command": "unset_all_service_proxy_backends"
	}
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
usernamestring

Required

The cPanel account's username.

A valid username.

example

Returns

This function only returns metadata.