Child pages
  • WHM API 0 Functions - lookupnsip

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function retrieves a nameserver's IP address.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/lookupnsip?nameserver=ns1.example.com
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/lookupnsip?nameserver=ns1.example.com
Expand
titleCommand Line
Code Block
languagebash
whmapi0 lookupnsip nameserver=ns1.example.com

Include Page
LIB:_WHMAPI0CLINote
LIB:_WHMAPI0CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
   "ip":"192.168.0.20"
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<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