Page tree

Versions Compared

Key

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


Section


Column

<< Back - Plan the Transfer Session


Column

Next - Check the transfer session >>



Section


Column

Include Page
LIB:_FCMenu
LIB:_FCMenu


Column

Overview

The creation process creates the transfer session.

Multiexcerpt include
MultiExcerptNameFCTrue
PageWithExcerptGuide to Transfer and Restore API Functions - Plan the Transfer Session

Create the transfer session

To create the transfer session, use one of the following functions:

Localtab Group


Localtab
activetrue
titleJSON API (root)

Multiexcerpt include
MultiExcerptNameJSONAPI
PageWithExcerptSDK:WHM API 1 Functions - create_remote_root_transfer_session

This function generates the following transfer session ID in the  transfer_session_id  return value:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptSDK:WHM API 1 Functions - create_remote_root_transfer_session

In this example,  vm5docscpanelnoroo201402251939519hmy is the transfer session ID.


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_debug(1);
$xmlapi->set_output('json');

$settings = array(
    'api.version'=>1, 
    'remote_server_type' => 'cpanel', 
    'host' => 'remote.example.com', 
    'port' => '22', 
    'user' => 'root', 
    'password' => 'luggage12345', 
    'transfer_threads' => '1', 
    'restore_threads' => '1', 
    'enable_custom_pkgacct' => '1', 
    'unrestricted_restore' => '1', 
    'copy_reseller_privs' => '0', 
    'compressed' => '0', 
    'unencrypted' => '0', 
    'low_priority' => '0'
);

$_result = $xmlapi->xmlapi_query('create_remote_root_transfer_session' , $settings);

print $_result;

This function returns the following transfer session ID as the  transfer_session_id value:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptSDK:WHM API 1 Functions - create_remote_root_transfer_session

In this example, vm5docscpanelnoroo201402251939519hmy is the transfer session ID.


Localtab
titleJSON API (User)

Multiexcerpt include
MultiExcerptNameJSONAPI
PageWithExcerptSDK:WHM API 1 Functions - create_remote_user_transfer_session

This function returns the following transfer session ID in the  transfer_session_id value:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptSDK:WHM API 1 Functions - create_remote_user_transfer_session

The transfer session ID is vm5docscpanelnoroo201402251939519hmy.


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_debug(1);
$xmlapi->set_output('json');

$settings = array(
    'api.version'=>1, 
    'host' => 'remote.example.com', 
    'password' => 'luggage12345',
);

$_result = $xmlapi->xmlapi_query('create_remote_user_transfer_session' , $settings);

print $_result;

This function returns the following transfer session ID in the  transfer_session_id value:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptSDK:WHM API 1 Functions - create_remote_user_transfer_session

In this example, vm5docscpanelnoroo201402251939519hmy is the transfer session ID.






Section

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers","api","whmapi1") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers","api","whmapi1") and label = "cpanel" and space = "ALD"


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers","api","whmapi1") and label = "cpanel" and space in (currentSpace(),"ALD")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers") and space = "SDK"