Child pages
  • UAPI Functions - Restore::get_users

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt
This function lists a reseller's users with existing backup metadata.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


Code Block
languagetext
https://hostname.example.com:2083/cpsessXXXXXXXXXXXX/execute/Restore/get_users

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// Get a list of reseller's users with backup metadata.
$get_users = $cpanel->uapi(
    'Restore', 'get_users'
 );


Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

# Get a list of reseller's users with backup metadata.
my $get_users = $cpliveapi->uapi(
    'Restore', 'get_users'
 );

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink


Expand
hiddentrue
MultiExcerptNamexml
titlecPanel Template Toolkit


Code Block
languagexml
<!--  Get a list of reseller's users with backup metadata -->
[% data = execute( 'Restore', 'get_users' ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

 

Include Page
LIB:_TTLink
LIB:_TTLink


Expand
titleCommand Line


Code Block
languagetext
uapi --user=username Restore get_users

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
   "metadata":{
      "transformed":1
   },
   "messages":null,
   "errors":null,
   "data":[
      "phpfpm",
      "example"
   ],
   "status":1,
   "warnings":null
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

This function does not accept parameters.

 Returns

ReturnTypeDescriptionPossible valuesExample
 dataarrayAn array of reseller account names.

One or more reseller account names.

 username