Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function retrieves a nameserver's IP address.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/lookupnsip?nameserver=ns1.example.com
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/lookupnsip?nameserver=ns1.example.com
 Command Line
whmapi0 lookupnsip nameserver=ns1.example.com

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "ip":"192.168.0.20"
}
 Output (XML)
<lookupnsip>
      <ip>192.168.0.20</ip>
</lookupnsip>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
nameserverstring

Required

The nameserver's hostname.

A valid nameserver hostname.ns1.example.com

 

Returns

ReturnTypeDescriptionPossible valuesExample
ipstringThe nameserver's IP address.A valid IP address.192.168.0.20