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

Description

This function returns a list of all remote server nodes linked to the server. It also provides details about each remote server node.

Examples


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


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)
{
   "data" : {
      "payload" : [
         {
            "worker_capabilities" : {
               "Mail" : {}
            },
            "username" : "root",
            "version" : "11.86.0.0",
            "last_check" : 1556576165,
            "tls_verified" : 0,
            "hostname" : "example.com",
            "alias" : "example",
            "enabled_services" : [
               "apache_php_fpm",
               "cpanellogd",
               "cpdavd",
               "cpgreylistd",
               "cpsrvd",
               "crond",
               "dnsadmin",
               "exim",
               "ftpd",
               "imap",
               "ipaliases",
               "lmtp",
               "mailman",
               "mysql",
               "named",
               "nscd",
               "pop",
               "postgresql",
               "queueprocd",
               "rsyslogd",
               "spamd",
               "sshd",
               "tailwatchd"
            ]
         }
      ]
   },
   "metadata" : {
      "reason" : "OK",
      "command" : "list_linked_server_nodes",
      "result" : 1,
      "version" : 1
   }
}


Note:

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

Parameters

This function does not accept any parameters.

Returns

ReturnTypeDescriptionPossible valuesExample

payload

hash

A hash of data for all linked remote server nodes.

Each hash contains the alias, hostname, last_checked, tls_verified, username, and version returns, the enabled_services array, and the worker_capabilities hash.

alias

string

The name of a linked remote server node.

This function returns this value in the payload hash.

A valid name.example

enabled_services

array

The services enabled on the linked remote server node.

This function returns this value in the payload hash.

A comma-separated list of services.

apache_php_fpm

hostname

string

The remote server node's hostname.

This function returns this value in the payload hash.

A valid hostname.example.com

last_checked

integer

The last time that the server queried the current status of the remote server node.

This function returns this value in the payload hash.

A timestamp, in Unix time format.

1556576165

tls_verified

Boolean

Whether the remote server node has a valid SSL certificate.

This function returns this value in the payload hash.

  • 1 — The remote server node has a valid SSL certificate.
  • 0 — The remote server does not have a valid SSL certificate.
1

username

string

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

The function returns this value in the payload hash.

A valid username.root

version

string

The version of cPanel & WHM installed on the remote server node.

This function returns this value in the payload hash.

A cPanel & WHM version number.

11.86.0.0

worker_capabilities

hash

A group of services required for a remote server node to perform a specific task.

This function returns this value in the payload hash.

Each hash contains the role_name return.

Note:

The return's name is the remote server node's current role.


role_name

hash

The current role of the linked remote server node. This will return the required options for the role, if any exist.

Note:

The return's name is the remote server node's current role.

This function returns this value in the worker_capabilities hash.

A server role.

Note:

If no options exist for the role, this function returns an empty hash.

Mail