You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

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

Description

This function returns details about a linked remote server node.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_linked_server_node?api.version=1&alias=example
 Command Line
whmapi1 get_linked_server_node alias=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)
{
	"data": {
		"worker_capabilities": {
			"Mail": {}
		},
		"tls_verified": 1,
		"version": "11.86.0.0",
		"hostname": "example.com",
		"username": "root",
		"last_check": 1556576165,
		"enabled_services": [
			"apache_php_fpm",
			"cpanellogd",
			"cpdavd",
			"cpgreylistd",
			"cpsrvd",
			"crond",
			"dnsadmin",
			"exim",
			"ftpd",
			"imap",
			"ipaliases",
			"lmtp",
			"mailman",
			"mysql",
			"named",
			"nscd",
			"pop",
			"queueprocd",
			"rsyslogd",
			"spamd",
			"sshd",
			"tailwatchd"
		]
	},
	"metadata": {
		"command": "get_linked_server_node",
		"result": 1,
		"version": 1,
		"reason": "OK"
	}
}


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

Returns

ReturnTypeDescriptionPossible valuesExample

enabled_services

array

The services enabled on the linked remote server node.

A comma-separated list of services.

apache_php_fpm
hostnamestringThe remote server node's hostname.A valid hostname.example.com

last_check

integer

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

A timestamp, in Unix time format.1556576165

tls_verified

Boolean

Whether the remote server node has a valid SSL certificate.

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

username

string

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


A valid username.root

version

string

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


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.

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, this function returns an empty hash.

Mail