API Get Users List

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 Users List

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->users();
    print_r($output);
?>

Returns: <syntaxhighlight lang="php"> Array (

   [title] => Users
   [users] => Array
       (
           [1] => Array
               (
                   [uid] => 1
                   [password] => $1$mUZkY1Ja$Gbsy8KC01RnDGfpgs3T9z/
                   [email] => test@test.com
                   [type] => 0
                   [aclid] => 0
                   [pid] => 0
                   [num_vs] => 0
                   [num_users] => 0
                   [space] => 0
                   [ram] => 0
                   [burst] => 0
                   [bandwidth] => 0
                   [cpu] => 0
                   [cores] => 4
                   [cpu_percent] => 0
                   [num_ipv4] => 0
                   [num_ipv6] => 0
                   [openvz] => 0
                   [xen] => 0
                   [xenhvm] => 0
                   [kvm] => 0
                   [sg] => 
                   [mg] => 
                   [preferences] => 
                   [dnsplid] => 0
               )
           [2] => Array
               (
                   [uid] => 2
                   [password] => $1$o8nEqTT4$oEmTvH9tkBeLcBuPzzRKi0
                   [email] => final@test.com
                   [type] => 0
                   [aclid] => 0
                   [pid] => 0
                   [num_vs] => 0
                   [num_users] => 0
                   [space] => 0
                   [ram] => 0
                   [burst] => 0
                   [bandwidth] => 0
                   [cpu] => 0
                   [cores] => 4
                   [cpu_percent] => 0
                   [num_ipv4] => 0
                   [num_ipv6] => 0
                   [openvz] => 0
                   [xen] => 0
                   [xenhvm] => 0
                   [kvm] => 0
                   [sg] => 
                   [mg] => 
                   [preferences] => 
                   [dnsplid] => 0
               )
           [4] => Array
               (
                   [uid] => 4
                   [password] => $1$sazc/M8q$cc9sjDUyl6Ml0mvtHyR/n1
                   [email] => divij@softaculous.com
                   [type] => 0
                   [aclid] => 0
                   [pid] => 0
                   [num_vs] => 0
                   [num_users] => 0
                   [space] => 0
                   [ram] => 0
                   [burst] => 0
                   [bandwidth] => 0
                   [cpu] => 0
                   [cores] => 4
                   [cpu_percent] => 0
                   [num_ipv4] => 0
                   [num_ipv6] => 0
                   [openvz] => 0
                   [xen] => 0
                   [xenhvm] => 0
                   [kvm] => 0
                   [sg] => 
                   [mg] => 
                   [preferences] => 
                   [dnsplid] => 0
               )
           [5] => Array
               (
                   [uid] => 5
                   [password] => $1$xJTNI5oa$PG.u9576Z/ghcnjc11BGv0
                   [email] => demo@demo.com
                   [type] => 0
                   [aclid] => 0
                   [pid] => 0
                   [num_vs] => 0
                   [num_users] => 0
                   [space] => 0
                   [ram] => 0
                   [burst] => 0
                   [bandwidth] => 0
                   [cpu] => 0
                   [cores] => 0
                   [cpu_percent] => 0
                   [num_ipv4] => 0
                   [num_ipv6] => 0
                   [openvz] => 0
                   [xen] => 0
                   [xenhvm] => 0
                   [kvm] => 0
                   [sg] => 0
                   [mg] => 
                   [preferences] => 
                   [dnsplid] => 0
               )
           [6] => Array
               (
                   [uid] => 6
                   [password] => $1$L3YytIVY$yz8dQhw7VctQmwD/cIN6y.
                   [email] => siddhesh@softaculous.com
                   [type] => 0
                   [aclid] => 0
                   [pid] => 0
                   [num_vs] => 0
                   [num_users] => 0
                   [space] => 0
                   [ram] => 0
                   [burst] => 0
                   [bandwidth] => 0
                   [cpu] => 0
                   [cores] => 0
                   [cpu_percent] => 0
                   [num_ipv4] => 0
                   [num_ipv6] => 0
                   [openvz] => 0
                   [xen] => 0
                   [xenhvm] => 0
                   [kvm] => 0
                   [sg] => 0
                   [mg] => 
                   [preferences] => 
                   [dnsplid] => 0
               )
           .
           .
           .
           .
       )
   [timenow] => 1403248293
   [time_taken] => 0.017

)