Use the Edit IPv6 Subnet API to edit the IPv6 subnet present on your server. You can also lock this subnet by passing in the locked parameter as shown. Locking the subnet will prevent it from being used by any other VPS.
For more information about IPv6 subnets, please refer this IPv6 Subnets guide.
HTTP Request
https://hostname:4085/index.php?act=editiprange&ipid=ipid
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | editiprange | The action will edit the IPv6 Subnet | Yes |
ipid | POST | Int | The IPv6 Subnet ID that needs to be edited | Yes |
editip | POST | 1/0 | If set then the ip will be edited | Yes |
ip | POST | text | The Ip address | Yes |
locked | POST | 1/0 | If set then the IPv6 Subnet will be locked | No |
netmask | POST | Int | The netmask of IPv6 Subnet to be updated, allowed values are(64/80/96/112) | No |
Sample Code
<?php
require_once('/usr/local/virtualizor/sdk/admin.php');
$key = 'your_api_key';
$pass = 'your_api_pass';
$ip = 'your_server_ip';
$admin = new Virtualizor_Admin_API($ip, $key, $pass);
$post = array();
$post['ip'] = '1234:0f0f:0f0f:0123:1000:0000:ecf7:0001';
$post['ipid'] = 104;
$post['netmask'] = 80;
$post['locked'] = 1;
$post['editip'] = 1;
$output = $admin->editiprange($post);
print_r(json_encode($output));
?>
Output
{
"title": "Edit IPs",
"timenow": 1481882455,
"time_taken": "0.109"
}