Repair distributed accounts with data loss

This function converts cPanel accounts that use a given child node to use the local server instead.

Unlike the WHM API 1 modifyacct API call, this API does not transfer users’ data from the child node as part of the conversion. This API is useful for emergency repairs if, for example, a child node goes permanently offline while accounts still use it.

Warning:

Because this API does not transfer users’ data from the child node, all converted users will lose data. You should only call this API as a last resort.

Authorizations:
query Parameters
node_alias
required
string

The child node’s alias (friendly name). This is the value passed in the WHM API 1 link_server_node_with_api_token function’s alias parameter.

Example: node_alias=mailalias
user
required
Array of strings

The usernames of the distributed cPanel accounts to convert.

Example: user=username&user=username1

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 force_dedistribution_from_node node_alias='mailalias' user='username' user='username1'

Response samples

Content type
application/json
{
  • "data": {
    • "log": [
      • {
        • "contents": "Converting “username1” …",
        • "indent": 0,
        • "type": "success"
        }
      ],
    • "user_info": [
      • {
        • "username": "username1"
        }
      ]
    },
  • "metadata": {
    • "command": "force_dedistribution_from_node",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}