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

Description

This function adds a range of IPv6 addresses to the server.

Notes:

  • This function cannot modify the server's shared IPv6 address. To update that address, modify the /etc/wwwacct.conf file, or use WHM's Basic WebHost Manager Setup interface (Home >> Server Configuration >> Basic WebHost Manager Setup).
  • 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_add?api.version=1&enabled=1&name=ExampleRange&range=2001%3Adb8%3A111%3A%3A%2F64
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/ipv6_range_add?api.version=1&enabled=1&name=ExampleRange&range=2001%3Adb8%3A111%3A%3A%2F64
 Command Line
whmapi1 ipv6_range_add enabled=1 name=ExampleRange range=2001%3Adb8%3A111%3A%3A%2F64


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.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "ipv6_range_add"
    }
}
 Output (XML)
<result>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>ipv6_range_add</command>
   </metadata>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
range
string

Required

The IPv6 address range.

A valid IPv6 address range and network portion, in CIDR format.
                2001:db8:66ac:cafe::/64
              

name

string

Required

The IPv6 address range's name.

A valid string.

Note:

You cannot use SHARED as a range's name. In cPanel & WHM version 54 and later, the system reserves this name for the server's shared IPv6 address. 

ExampleRange
enabledBooleanWhether the IPv6 address range is available.
  • 1 — Available.
  • 0 — Reserved.
1

Returns

This function only returns metadata.