You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

Page tree
Skip to end of metadata
Go to start of metadata

Overview

The creation process creates the transfer session.

In these examples, the following statements are true:

  • You have two servers: remote.example.com and hostname.example.com
  • You logged in to the local server with the cpsess########## security token.
  • The example account owns example.com, and you want to transfer it from the remote server to the local server.
  • The example.com domain is 123,456,789 bytes.
  • You want to transfer the package1 package from the remote server to the local server.
  • The root password for the remote server is luggage12345  

Create the transfer session

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

    Page not found for multiexcerpt macro.
The page: SDK:WHM API 1 Functions - create_remote_root_transfer_session was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

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

 Click to view...

    Page not found for multiexcerpt macro.
The page: SDK:WHM API 1 Functions - create_remote_root_transfer_session was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

In this example,  vm5docscpanelnoroo201402251939519hmy is the transfer session ID.

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:

 Click to view...

    Page not found for multiexcerpt macro.
The page: SDK:WHM API 1 Functions - create_remote_root_transfer_session was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

In this example, vm5docscpanelnoroo201402251939519hmy is the transfer session ID.

    Page not found for multiexcerpt macro.
The page: SDK:WHM API 1 Functions - create_remote_user_transfer_session was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

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

 Click to view...

    Page not found for multiexcerpt macro.
The page: SDK:WHM API 1 Functions - create_remote_user_transfer_session was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

The transfer session ID is vm5docscpanelnoroo201402251939519hmy.

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:

 Click to view...

    Page not found for multiexcerpt macro.
The page: SDK:WHM API 1 Functions - create_remote_user_transfer_session was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

In this example, vm5docscpanelnoroo201402251939519hmy is the transfer session ID.



Additional documentation

There is no content with the specified labels

Error rendering macro 'contentbylabel'

parameters should not be empty

There is no content with the specified labels

Error rendering macro 'contentbylabel'

parameters should not be empty