# API: Unsuspend service by IP
# unsuspendServiceByIP
Unuspend service by IP. If more than one service uses this IP, specify its ID as optional argument. Note: This function is added by Account Search module, you need to activate it first in order to use this call
# Required parameters
Parameter | Description |
---|---|
ip | Service IP to unsuspend |
# Optional parameters
Parameter | Description |
---|---|
id | Exact service id to unsuspend, used if there is more than one service with certain IP |
source | Where to look for the IP, can be set to ipam, proxmox, vpsdata or localcloud |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=unsuspendServiceByIP&ip=IP
# PHP Samples
$url = 'http://url_to_hb.com/admin/api.php';
$post = [
'call' => 'unsuspendServiceByIP',
'api_id' => $API_ID,
'api_key' => $API_KEY,
'ip' => $IP,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);
$return = json_decode($data, true);
print_r($return);
include 'class.hbwrapper.php';
HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key');
$params = [
'ip' => $IP,
];
$return = HBWrapper::singleton()->unsuspendServiceByIP($params);
print_r($return);
/* Use this method to access HostBill api from HostBill modules */
$api = new ApiWrapper();
$params = [
'ip' => $IP,
];
$return = $api->unsuspendServiceByIP($params);
print_r($return);
# Response