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 - update_linked_server_node
Skip to end of metadata
Go to start of metadata

Description

This function updates a linked remote server node.

Important:

  • You cannot link to a remote server node that uses cPanel & WHM version 76 and earlier. The remote server node must use a version that is the same as or greater than your server version.
  • This function requires the use of an API token. For more information, read our Guide to API Authentication - API Tokens in WHM documentation.
  • In cPanel & WHM version 82, this function only links servers that are capable of mail services. If a server does not have mail service capability, you cannot use this function.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/update_linked_server_node?api.version=1&api_token=23ZX8RA1FTE1IVJRL90MB5CREDS4UE2H&alias=example&hostname=example.com&username=root&skip_tls_verification=0
 Command Line
whmapi1 update_linked_server_node api_token=23ZX8RA1FTE1IVJRL90MB5CREDS4UE2H alias=example hostname=example.com username=root skip_tls_verification=0


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,
    "reason": "OK",
    "result": "1",
    "command": "update_linked_server_node"
  }
}


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
aliasstring

Required

The name of a linked remote server node.

A valid name.

example
api_tokenstring

The API token required to make API calls to the remote server node.

Note:

The API token  must have  root -level access on the remote server node.

This value defaults to the existing API token.

A valid API token.

23ZX8RA1FTE1IVJRL90MB5CREDS4UE2H
hostnamestring

A new remote server node's hostname. The system will update your remote server node's hostname to this value.

This value defaults to the existing hostname.

A valid hostname.

Note:

This parameter does  not accept an IP address.

example.com
usernamestring

The username required to make API calls to the remote server node.

This value defaults to the existing username.

A valid username.

Note:

The username must have root-level access on the remote server node.

root
skip_tls_verificationBoolean

Whether to skip SSL/TLS verification. The system performs this action when it queries the remote server node.

This value defaults to 1.

  • 1 — Skip SSL/TLS verification.
  • 0 — Do not skip SSL/TLS verification.

    Note:

    You cannot use this value if the remote server node is already SSL/TLS verified.

0

Returns

This function only returns metadata.