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

Description

This function retrieves usage information for IPv6 addresses in an IPv6 range.

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_usage?api.version=1&name=WhereTheSkiesAreNotCloudyAllDay
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/ipv6_range_usage?api.version=1&name=WhereTheSkiesAreNotCloudyAllDay
 Command Line
whmapi1 ipv6_range_usage name=WhereTheSkiesAreNotCloudyAllDay


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)
{
   "data": {
        "usage": {
            "forbidden": "65536",
            "free": "used",
            "used": "20"
   },
   "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "ipv6_range_usage"
        }
    }
}
 Output (XML)
<result>
   <data>
      <usage>
         <forbidden>65536</forbidden>
         <free>1000000</free>
         <used>20</used>
      </usage>
   </data>
   <metadata>
      <version>1</version>
      <reason>OK</reason>
      <result>1</result>
      <command>ipv6_range_usage</command>
   </metadata>
</result>


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
name
string

Required

The IPv6 address range's name.

  • The name of an IPv6 address range on the server.
  • SHARED — The server's shared IPv6 address. cPanel & WHM version 54+ only.
WhereTheSkiesAreNotCloudyAllDay

Returns

ReturnTypeDescriptionPossible valuesExample
usage
hash

A hash of the IPv6 address range's information.

This hash includes the forbidden, free, and used returns.
 

forbidden

integer

The number of reserved IPv6 addresses.

The function returns this value in the usage hash.

A positive integer.
65536

free

integer

The number of available IPv6 addresses.

The function returns this value in the usage hash.

A positive integer.
1000000

used

integer

The number of assigned IPv6 addresses.

The function returns this value in the usage hash.

A positive integer.
20