Child pages
  • Guide to Transfer and Restore API Functions - Queue the Transfer Item

Versions Compared

Key

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

Introduction

Excerpt

When you queue the transfer item, you add a package or account (transfer item) to the transfer list.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@880
MultiExcerptNameTandRExcerpt
PageWithExcerptGuide to Transfer and Restore API Functions - Plan the Transfer Session

Queue the transfer item

The function's structure depends on the transfer module into which that handles the transfer item. Use the WHM API 1 enqueue_transfer_item function to add a transfer item to the transfer session.

Select the tab below that corresponds to the method by which you wish to call the function:

Localtab Group


Localtab
titleJSON API (root)

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@880
MultiExcerptNameJSONAPIRemoteRoot
PageWithExcerptWHM API 1 Functions - enqueue_transfer_item


Localtab
titlePHP (root)


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array(
 'api.version'=>1, 
 'transfer_session_id' => 'remoteexamplecomnoroo20140501194105g7qG', 
 'module'=>'AccountRemoteRoot', 
 'user' => 'transferme', 
 'size' => '123456789', 
 'localuser' => 'transferme', 
 'detected_remote_user' => 'transferme', 
 'domain' => 'transferme.com', 
 'replaceip' => 'all', 
 'reseller' => '0', 
 'force' => '0', 
 'ip' => '0', 
 'skiphomedir' => '0', 
 'shared_mysql_server' => '0', 
 'skipres' => '1', 
 'skipacctdb' => '0', 
 'skipbwdata' => '0', 
 'skipaccount' => '0', 
 'xferpoint' => '1'
);
$_result = $xmlapi->xmlapi_query('enqueue_transfer_item' , $settings);

print $_result;



Localtab
titleJSON API (User)

Multiexcerpt include
MultiExcerptNameJSONAPIRemoteUser
PageWithExcerptWHM API 1 Functions - enqueue_transfer_item


Localtab
titlePHP (User)


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array(
 'api.version'=>1, 
 'transfer_session_id' => 'remoteexamplecomnoroo20140501194105g7qG', 
 'module'=>'AccountRemoteUser', 
 'user' => 'transferme', 
 'size' => '123456789', 
 'localuser' => 'transferme', 
 'detected_remote_user' => 'transferme', 
 'domain' => 'transferme.com', 
 'replaceip' => 'all', 
 'reseller' => '0', 
 'force' => '0', 
 'ip' => '0', 
 'skiphomedir' => '0', 
 'shared_mysql_server' => '0', 
 'skipres' => '1', 
 'skipacctdb' => '0', 
 'skipbwdata' => '0', 
 'skipaccount' => '0', 
 'xferpoint' => '1'
);
$_result = $xmlapi->xmlapi_query('enqueue_transfer_item' , $settings);

print $_result;



This function only returns the following metadata:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptWHM API 1 Functions - enqueue_transfer_item

For root transfers only, add the transfer of the  package1  package to the queue with the WHM API 1 enqueue_transfer_item function.

Select the tab below that corresponds to the method by which you wish to call the function:

Localtab Group


Localtab
titleJSON API

Multiexcerpt include
MultiExcerptNameJSONAPIPackage
PageWithExcerptWHM API 1 Functions - enqueue_transfer_item


Localtab
titlePHP


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array(
 'api.version' => '1', 
 'transfer_session_id' => "remoteexamplecopya20140211211719FxjU',
 'module' => 'PackageRemoteRoot',
 'package' => 'package1'
);
$_result = $xmlapi->xmlapi_query('enqueue_transfer_item' , $settings);

print $_result;