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

Description

This function returns the status of a linked remote server node. It returns the linked remote server's status with the WHM API 1 version and get_current_profile functions.

Important:

This function requires that the remote server node uses cPanel & WHM version 76 or later.

Examples


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


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" : {
      "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"
      ],
      "version" : "11.86.0.0",
      "tls_verified" : 1
   },
   "metadata" : {
      "command" : "get_server_node_status",
      "version" : 1,
      "reason" : "OK",
      "result" : 1
   }
}


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample

api_token

string

Required

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

Note:

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

A valid API token.23ZX8RA1FTE1IVJRL90MB5CREDS4UE2H
hostnamestring

Required

The remote server node's hostname.

A valid hostname or IP address.

Note:

If you use an IP address, you must use the skip_tls_verification=1 parameter.

example.com

username

string

Required

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

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 0.

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

Returns

ReturnTypeDescriptionPossible valuesExample

enabled_services

array

A hash of the remote server node's enabled services.

A comma-separated list of services.

apache_php_fpm

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

version

string

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

A valid cPanel & WHM version number.

11.86.0.0