Description

This function retrieves a cPanel account's user task queue information.

 

Examples 




https://hostname.example.com:2083/cpsess##########/execute/UserTasks/retrieve



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Retrieve the user task queue.
$templates = $cpanel->uapi(
    'UserTasks', 'retrieve',
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Retrieve the user task queue.
my $templates = $cpliveapi->uapi(
    'UserTasks', 'retrieve',
);

 



<!-- Retrieve the user task queue. -->
[% execute( 'UserTasks', 'retrieve' ); %]

 



uapi --user=username UserTasks retrieve



{  
   "errors":null,
   "metadata":{  
      "transformed":1
   },
   "status":1,
   "data":[
      {
          "id": "00000000/5a9ec8dd4c345d",
          "subsystem": "VersionControl",
          "action": "create",
          "args": {}
      },
      {
          "id": "00000000/h39dnn27suc13l",
          "subsystem": "VersionControl",
          "action": "create",
          "args": {
              "repository_root": "/home/user/public_html/example"
          }
      },
],
   "messages":null
}



Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample

 

array of hashesAn unnamed array of hashes of data for a task in the user task queue.This array of hashes includes the id, subsystem, and action parameters and the args hash. 

id

string

The task's ID number.

The function returns this value in the task's hash.

A valid task ID.00000000/5a9ec8dd4c345d

subsystem

string

The subsystem that will handle the process.

The function returns this value in the task's hash.

VersionControl is the only possible value.

VersionControl

action

string

The task's action.

The function returns this value in the task's hash.

create is the only possible value.

create

args

hash

A hash of action- and subsystem-specific arguments.

The function returns this value in the task's hash.

One or more arguments for the specific action and subsystem.

For example, a task that returns an action value of create and a subsystem value of VersionControl will include the repository_root argument.