Get Virtualizor

Delete IP Logs

Virtualizor has logging enabled by default. The IP Logs are stored indefinitely on the server and can be removed by using the Delete IP Logs API.

The API response will contain "iplogs" as an empty array after successful deletion of the IP logs.

HTTP Request

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

Parameters

NameMethodValueDescriptionRequired
actGETiplogsThe action will return data after performing the operationYes
deletePOST1/0If set then the logs will be deleted from the serverYes

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'] = 1 ;

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

    print_r(json_encode($output));
?>

Output

{
    "title": "IP Logs",
    "current_status": null,
    "iplogs": [],
    "timenow": 1481714110,
    "time_taken": "0.109"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list