API: del_ips_from_service
Main:
- my_balance
- add_service
- update_service
- get_available_locations
- get_service_info
- suspend_service
- unsuspend_service
- terminate_service
- get_account_services
- prolong_service
- del_ips_from_service
- add_typecancel
- terminate_typecancel
- applycredit
- get_ips_access_list
- update_ips_access_list
- change_service_pass
- add_hosts_to_block
- del_hosts_from_block
- get_hosts_blocked_info
Work with groups:
del_ips_from_service
Discription: Deleting IP addresses from the service
Parameter | Type | Description | Required |
---|---|---|---|
action | string | del_ips_from_service | required |
hash | string | Your API hash | required |
userid | int | Your customer ID | required |
serviceid | int | Service ID | required |
ips_for_del | string | A comma-separated list of IP addresses to delete on the service. Important: the number of deleted IP addresses must be less than the number of IP addresses on the service, otherwise you need to use the procedure for deleting the service! | required |
! | Important | When the IP is deleted, the service renewal cost is automatically recalculated. There is no refund for the unused period of deleted proxies. |
Example Request (CURL)
$postfields = array( "userid"=>$userid, "hash"=>$hash, "action"=>"del_ips_from_service", "ips_for_del" => "192.168.4.67,192.168.0.42", "serviceid"=>111 ); $result = connect_api_proxy007com($postfields); function connect_api_proxy007com($postfields) { $url = "https://proxy007.com/proxy/api/index.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 900); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); return $data; }
Answer:
{"code":"2001","status":"successful","ips_list":"192.4.0.56,134.3.67.4"}
the "ips_list" field contains the current list of IPs that was left on the service.