Show IP Address Usage

Description

Use the Show IP Address Usage API to View usage of IP Addresses.

The API response list of IP's.

Parameters

Sample Code

curl --insecure  "https://hostname:2005/index.php?api=json&act=ips&used=1&apiuser=user_name&apikey=pass_api_key"
<?php
 
 $url = 'https://hostname:2005/index.php?api=json&act=ips&apiuser=user_name&apikey=pass_api_key'; 

 $post = array('used' => 1
 );


// Set the curl parameters 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

if(!empty($post)){
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}

// Get response from the server. 
$resp = curl_exec($ch);

print_r($resp);
<?php
include_once('/usr/local/webuzo/sdk/webuzo_sdk_v2.php');

$user = 'user_name';
$pass = 'password';
$host = 'hostname';

$webuzo = new Webuzo_Admin_SDK($user, $pass, $host);

$used = 1;

$res = $webuzo->rebuild_ips_pool($ip='', $user='', $used);

print_r($res['ips']);

?>

Output

{"IP_address":{ "ipid":1, "uuid":"abc", "ip":"IP_address", "type":4, "users":"user_names", "netmask":"", "shared":1, "lock":0, "note":"", "created":00000 }

Was this page helpful?