Get Virtualizor

Delete IP Pool

Use the Delete IP Pool API to delete an IP pool from your server by passing the ID of the IP pool to the API. Multiple IP pool can also be deleted by passing the IDs as comma separated values. Make sure that no IP from the IP pool is used by any VPS before deleting the IP pool. The API response will contain "done" as the array of the IDs of the deleted IP pool.

HTTP Request

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

Parameters

NameMethodValueDescriptionRequired
actGETippoolThe action specified to perform the operation and will return "done" as the array of ID of the IP pool that have been deletedYes
deletePOSTIntThe IP Pool ID that needs to be deleted, you can pass in multiple IDs as string of 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);

    $post = array();
    $post['delete'] = 7;
    $post['delete'] = '8,9,10'; // For deleting multiple IP pools

    $output = $admin->deleteippool($post);

    print_r(json_encode($output));
?>

Output

{
  "title": "IP Pool",
  "done": [
    7
  ],
  "ippools": null,
  "timenow": 1535383475,
  "time_taken": "0.436"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list