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

Description

This function lists available IPv6 address ranges.

Note:

For all of cPanel & WHM's features to function properly on IPv6, the cpsrvd daemon must listen on IPv6 addresses. To enable this functionality, select On for the Listen on IPv6 Addresses setting in the System section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).

Examples


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

Notes:

  • 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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "data":{  
      "range":[  
         {  
            "owner":"owner",
            "first":"2001:db8:0100:0006:0000:0000:0000:0000",
            "name":"happy_range",
            "last":"2001:db8:0100:0006:ffff:ffff:ffff:ffff",
            "CIDR":"2001:db8:100:6::/64",
            "mostrecent":"2001:db8:0100:0006:0000:0000:0002:00ce",
            "note":"This is a good range",
            "range_users":[  
               "user1",
               "user2",
               "user3",
               "user4"
            ],
            "enabled":"1"
         }
      ]
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"ipv6_range_list"
   }
}
 Output (XML)
<result>
   <data>
      <range>
         <owner>ownername</owner>
         <first>2001:db8:0100:0006:0000:0000:0000:0000</first>
         <name>happy_range</name>
         <last>2001:db8:0100:0006:ffff:ffff:ffff:ffff</last>
         <CIDR>2001:db8:100:6::/64</CIDR>
         <mostrecent>2001:db8:0100:0006:0000:0000:0002:00ce</mostrecent>
         <note>This is a good range</note>
         <range_users>
             <range_users>user1</range_users>
             <range_users>user2</range_users>
             <range_users>user3</range_users>
             <range_users>user4</range_users>
         </range_users>
         <enabled>1</enabled>
      </range>
   </data>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>ipv6_range_list</command>
   </metadata>
</result>


Note:

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

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
rangearray of hashesAn array of hashes of the IPv6 address range information.This array of hashes includes the owner, first, name, last, CIDR, mostrecent, note, range_users, and enabled returns. 

owner

string

The IPv6 address range's owner.

The function returns this value in the range hash.

A valid integer.
0

first

string

The IPv6 address range's first available address.

The function returns this value in the range hash.

A valid IPv6 address.
2001:db8:0100:0006:0000:0000:0000:0000

name

string

The IPv6 address range's name.

The function returns this value in the range hash.

  • A valid IPv6 range name.
  • SHARED — The server's main IPv6 address.
happy_range

last

string

The IPv6 address range's last available address.

The function returns this value in the range hash.

A valid IPv6 address.
2001:db8:0100:0006:ffff:ffff:ffff:ffff

CIDR

string

The IPv6 address range's addresses.

The function returns this value in the range hash.

An IPv6 address range and network portion, in CIDR format.
2001:db8:100:6::/64

mostrecent

string

The most-recently assigned address from the IPv6 address range.

The function returns this value in the range hash.

A valid IPv6 address.
2001:db8:0100:0006:0000:0000:0002:00ce

note

string

The IPv6 address range's note.

The function returns this value in the range hash.

A valid string.
This is a good range

range_users

array

The user or users who use addresses in the IPv6 address range.

The function returns this value in the range hash.

A list of valid cPanel usernames.
user1

enabled

boolean

Whether the IPv6 address range is reserved.

The function returns this value in the range hash.

  • 1 — Reserved.
  • 0Not reserved.
0