WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function removes the IPv6 address from an account.
Notes:
- When you disable IPv6 on an account, the system unbinds that IPv6 address from your server and the account loses the address. If you enable IPv6 on that account again, the system assigns it a different IPv6 address.
- For all of cPanel & WHM's features to function properly on IPv6, the
cpsrvddaemon 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).
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ipv6_disable_account
- A server running WHM.
https://whm-server.tld:2087/json-api/ipv6_disable_account
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ipv6_disable_account?user=user1%2Cuser2%2Cuser3'{ "data": { "fail_cnt": 0, "failures": [ … ] }, "metadata": { "command": "ipv6_disable_account", "reason": "OK", "result": 1, "version": 1 } }
Request
This function assigns an IPv6 address to one or more accounts.
Note:
You must perform at least one of the following actions before you call this function:
- Use WHM's IPv6 Ranges interface (WHM >> Home >> IP Functions >> IPv6 Ranges) or WHM API 1's
ipv6_range_addfunction to add one or more IPv6 address ranges for use as dedicated IPv6 addresses. - Use WHM's Basic WebHost Manager Setup interface (WHM >> Home >> Server Configuration >> Basic WebHost Manager Setup) or modify the
/etc/wwwacct.conffile to add a shared IPv6 address to the server. - For all of cPanel & WHM's features to function properly on IPv6, the
cpsrvddaemon 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).
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ipv6_enable_account
- A server running WHM.
https://whm-server.tld:2087/json-api/ipv6_enable_account
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ipv6_enable_account?range=Hosting_IPv6_Block&user=user1%2Cuser2%2Cuser3'HTTP Request was successful.
{ "data": { "fail_cnt": 2, "failures": { … }, "ipv6": { … } }, "metadata": { "command": "ipv6_enable_account", "reason": "OK", "result": 1, "version": 1 } }
Request
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
cpsrvddaemon 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).
Important:
When you disable the Web Server role, the system disables this function.
The IPv6 address range's name.
Note:
You cannot use SHARED as a range's name. It is reserved for the server's shared IPv6 address.
The IPv6 address range and network portion in CIDR format.
Whether the IPv6 address range is available.
Note
1- Available.0- Reserved.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ipv6_range_add
- A server running WHM.
https://whm-server.tld:2087/json-api/ipv6_range_add
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ipv6_range_add?name=ExampleRange&range=2001%3Adb8%3A66ac%3Acafe%3A%3A%2F64&enabled=1¬e=Initial+IPv6+address+pool'{ "metadata": { "command": "ipv6_range_add", "reason": "OK", "result": 1, "version": 1 } }