Get Virtualizor

Delete IPv6 Subnet

Use the Delete IPv6 Subnet API to delete the IPv6 subnet. The API response will return "done" as "true" on successful deletion of the IPv6 subnet.

IPv6 subnets used by a VPS cannot be deleted.

HTTP Request

https://hostname:4085/index.php?act=ipranges

Parameters

NameMethodValueDescriptionRequired
actGETiprangesThe action will return done as true on successYes
pagePOSTIntIf not specified, then only first 50 records are returnedYes
reslenPOSTIntNumber of records to be returned, default is 50Yes
deletePOSTIntThe ID of the IPv6 subnet you want to delete. To delete multiple ipv6 subnet pass in the IDs as comma separated valuesYes

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);

    $page = 1;
    $reslen = 20;
    $post = array();
    $post['delete'] = 538;

    $output = $admin->iprange($page, $reslen, $post);

    print_r(json_encode($output));

?>

Output

{
    "title": "IPv6 Subnets",
    "done": true,
    "ips": {
        "104": {
            "ipid": "104",
            "ippid": "6",
            "ip_serid": "0",
            "vpsid": "2206",
            "ip": "1111:1111:1111:0df0:0000:0000:0000:0001",
            "ipv6": "1",
            "ipr_netmask": "80",
            "primary": "-7",
            "ipr_ips": "null",
            "mac_addr": "null",
            "locked": "1",
            "ipp_serid": "0",
            "ippool_name": "pool7",
            "gateway": "2a06:8ec0::4",
            "netmask": "10",
            "ns1": "8.8.8.8",
            "ns2": "8.8.4.4",
            "nat": "0",
            "nat_name": "",
            "routing": "1",
            "internal": "0",
            "bridge": "",
            "mtu": "0",
            "vlan": "0",
            "hostname": "null"
        },
        "108": {
            "ipid": "108",
            "ippid": "6",
            "ip_serid": "0",
            "vpsid": "2018",
            "ip": "1111:1111:1111:0fec:0000:0000:0000:0001",
            "ipv6": "1",
            "ipr_netmask": "64",
            "primary": "-5",
            "ipr_ips": "null",
            "mac_addr": "null",
            "locked": "0",
            "ipp_serid": "0",
            "ippool_name": "pool7",
            "gateway": "2a06:8ec0::4",
            "netmask": "10",
            "ns1": "8.8.8.8",
            "ns2": "8.8.4.4",
            "nat": "0",
            "nat_name": "",
            "routing": "1",
            "internal": "0",
            "bridge": "",
            "mtu": "0",
            "vlan": "0",
            "hostname": "null"
        }
    },
    "timenow": 1481883964,
    "time_taken": "0.147"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list