API Login Logs

From Virtualizor Wiki
Jump to: navigation, search
NOTE
This is OLD API Documentation. Click on the following link for New API Documentation
Admin API

Get list Login Logs


Parameters Description
page_number If not specified, then only first 50 records are returned
count Number of records to be returned, default is 50

Example Code:

<?php

    require_once('admin.php');

    $key =  'uketenhrhpunty5lhgwkcuxxxxxxxxxx';

    $pass = 'yrsofc3tg3tre7bjpfppspxxxxxxxxxx';

    $ip = 'xxx.xxx.xxx.xxx';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $output = $admin->$admin->loginlogs(1,20);
    
    print_r($output);

?>

Returns:

Array
(
    [title] => Login Logs
    [loginlogs] => Array
        (
            [0] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403173998
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [1] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403169691
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [2] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403169687
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [3] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403161520
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [4] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403160824
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [5] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403159707
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [6] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403158064
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [7] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403106251
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [8] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403090674
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [9] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403072121
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [10] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403072110
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [11] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403068148
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [12] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403068141
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [13] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403068137
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [14] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403068134
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [15] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403065344
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [16] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403065337
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [17] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403008313
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [18] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403008114
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

            [19] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403008106
                    [status] => 0
                    [ip] => xxx.xxx.xxx.xxx
                )

            [20] => Array
                (
                    [username] => root
                    [vpsid] => 0
                    [time] => 1403006776
                    [status] => 1
                    [ip] => xxx.xxx.xxx.xxx
                )

        )

    [timenow] => 1403176479
    [time_taken] => 0.015
)