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

Check out our new API beta site!

Child pages
  • WHM API 1 Functions - retrieve_transfer_session_remote_analysis
Skip to end of metadata
Go to start of metadata

Description

This function analyzes a transfer session.

Note:

For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.

Examples


 JSON API


https://hostname.example.com:2087/cpsess##########/json-api/retrieve_transfer_session_remote_analysis?api.version=1&transfer_session_id=exampleservercopya20140206192428NtyW

 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/retrieve_transfer_session_remote_analysis?api.version=1&transfer_session_id=exampleservercopya20140206192428NtyW
 Command Line
whmapi1 retrieve_transfer_session_remote_analysis transfer_session_id=exampleservercopya20140206192428NtyW


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)


{
	"data": {
		"options": {
			"skip_reseller_privs": null,
			"unrestricted": "0"
		},
		"transfer_session_id": "exampleservercopya20140206192428NtyW",
		"config": {
			"shared_mysql_server": null
		},
		"local": {
			"groups": {
				"never": 1,
				"gonna": 1,
				"give": 1,
				"you": 1,
				"up": 1
			},
			"users": {
				"never": 1,
				"gonna": 1,
				"let": 1,
				"you": 1,
				"down": 1
			},
			"dbs": null,
			"linked_nodes": [{
				"alias": "localmailnode",
				"hostname": "localmail.example.com",
				"worker_capabilities": {
					"Mail": {}
				}
			}],
			"available_ips": [

			]
		},
		"remote": {
			"version": 0,
			"resellers": {

			},
			"has_disk_used": 0,
			"linked_nodes": [{
				"alias": "remotemailnode",
				"hostname": "remotemailnode.example.com",
				"worker_capabilities": {
					"Mail": {}
				}
			}],
			"dbs": null,
			"host": null,
			"has_xfertool": 0,
			"has_owners": 0,
			"server_type": null,
			"supports_live_transfers": 1
		},
		"items": {
			"packages": [],
			"accounts": []
		}
	},
	"metadata": {
		"version": 1,
		"reason": "OK",
		"result": "1",
		"command": "retrieve_transfer_session_remote_analysis"
	}
}

 Output (XML)
<result>
    <data>
        <options>
            <skip_reseller_privs/>
            <unrestricted>0</unrestricted>
        </options>
        <transfer_session_id>vm5docscpanelnoroo201402251939519hmy</transfer_session_id>
        <config>
            <shared_mysql_server/>
        </config>
        <local>
            <groups>
                <never>1</never>
                <gonna>1</gonna>
                <give>1</give>
                <you>1</you>
                <up>1</up>
            </groups>
            <users>
                <never>1</never>
                <gonna>1</gonna>
                <let>1</let>
                <you>1</you>
                <down>1</down>
            </users>
            <dbs/>
			<linked_nodes>
				<linked_node>
					<alias>localmailnode</alias>
					<hostname>localmailnode.example.com</hostname>
					<worker_capabilities>
						<Mail/>
					</worker_capabilities>
				</linked_node>
			</linked_nodes>
        </local>
        <remote>
            <version>0</version>
            <resellers/>
            <has_disk_used>0</has_disk_used>
			<linked_nodes>
				<linked_node>
					<alias>remotemailnode</alias>
					<hostname>remotemailnode.example.com</hostname>
					<worker_capabilities>
						<Mail/>
					</worker_capabilities>
				</linked_node>
			</linked_nodes>
            <dbs/>
            <host/>
            <has_xfertool>0</has_xfertool>
            <has_owners>0</has_owners>
            <server_type/>
			<supports_live_transfers>1</supports_live_transfers>
        </remote>
        <items/>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>retrieve_transfer_session_remote_analysis</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
transfer_session_id
string

Required

The transfer session's ID.

A valid string. exampleservercopya20140206192428NtyW

Returns

ParameterTypeDescriptionPossible valuesExample
optionshashA hash of transfer session options.This hash includes the skip_reseller_privs array.

skip_reseller_privs

array

Accounts from which the remote system will strip reseller privileges.

The function returns this value in the options hash.

An array of cPanel accounts.example
transfer_session_idstring

The transfer session's ID.

A valid string. exampleservercopya20140206192428NtyW
confighashA hash of transfer configuration optionsThis hash includes the shared_mysql_server return.

shared_mysql_server

Boolean

Whether the remote and target server share the same MySQL® server.

The function returns this value in the config hash.


  • 1 — The remote and target server share the same MySQL server.
  • 0 — The remote and target server do not share the same MySQL server.
1
localhashA hash of local account information.This hash includes the groups, users, dbs, and available_ips hashes.

groups

hash

A hash of the local server's account groups.

The function returns this value in the local hash.

This hash includes the group name return.

group name

Boolean

Whether the group exists on the server.

Note:

The group name is the parameter name.

The function returns this value in the groups hash.

11

users

hash

A hash of the local server's accounts.

The function returns this value in the local hash.

This hash includes the user name return.

user name

Boolean

Whether the user exists on the server.

Note:

This user name is the parameter name.

The function returns this value in the users hash.

11

dbs

hash

A hash of the local server's databases.

The function returns this value in the local hash.

This hash includes the database name return.

database name

Boolean

Whether the database exists on the server.

Note:

The database name is the parameter name.

The function returns this value in the dbs hash.

11

linked_nodes

array of hashes

An array containing the local server's linked cPanel nodes, if any exist.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the local hash.

This hash includes the alias and hostname returns, and the worker_capabilities hash.

alias

string

The local server's linked cPanel server node alias.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the linked_nodes hash.

A linked cPanel server node's alias.localmailnode

hostname

string

The local server's linked cPanel server node hostname.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the linked_nodes hash.

A valid hostname.localmailnode.example.com

worker_capabilities

hash

A hash containing a group of services required for the local server's linked cPanel server node to perform a specific task.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the linked_nodes hash.

Each hash contains the ROLENAME hash.

ROLENAME

hash

A hash containing the role of the local server's linked cPanel server node. This also returns the role's enabled optional roles, if any exist.

Note:

  • The return's name is the current role of the local server's linked cPanel server node.
  • We added this return in cPanel & WHM version 88.

The function returns this value in the worker_capabilities hash.

A cPanel server role.

Note:

If no enabled optional roles exist, this function returns an empty hash.

Mail

available_ips

array

A list of the local server's available IP addresses.

The function returns this value in the local hash.

An array of valid IP addresses.192.168.0.1
remotehashA hash of the remote server's information.This hash includes the version, has_disk_used, dbs, host, has_xfertool, has_owners, and server_type  returns and resellers array.

version

string

The remote server's software version number.

The function returns this value in the remote hash.

A valid string.
0

resellers

array

The remote server's reseller names.

The function returns this value in the remote hash.

An array of cPanel accounts.example

has_disk_used

Boolean

Whether the remote server can transmit disk usage information to the target server.

Note:

cPanel & WHM servers have this ability by default.

The function returns this value in the remote hash.

  • 1 — Remote server can transmit disk usage information.
  • 0 — Remote server cannot transmit disk usage information.
1

dbs

integer

The number of databases on the remote server.

The function returns this value in the remote hash.

A valid integer.42

host

string

The remote server's hostname.

The function returns this value in the remote hash.

A valid hostname.source.example.com

has_xfertool

Boolean

Whether the remote server has the transfer tool.

The function returns this value in the remote hash.

  • 1 — Remote server has transfer tool.
  • 0 — Remote server does not have transfer tool.
1

has_owners

Boolean

Whether the remote server can transmit owner information to the target server.

Note:

If the remote server cannot transfer owner information, the transfer tool assumes that root owns all accounts.

The function returns this value in the remote hash.


  • 1 — Remote server can transmit owner information.
  • 0 — Remote server cannot transfer owner information, and the transfer tool will assume that root owns all accounts.
1

linked_nodes

array of hashes

An array containing the remote server's linked cPanel server nodes, if any exist.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the remote hash.

This hash includes the alias and hostname returns, and the worker_capabilities hash.

alias

string

The remote server's linked cPanel server node alias.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the linked_nodes hash.

A linked cPanel server node's alias.mailnode

hostname

string

The remote server's linked cPanel server node hostname.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the linked_nodes hash.

A valid hostname.remotemailnode.example.com

worker_capabilities

hash

A hash containing a group of services required for the remote server's linked cPanel server node to perform a specific task.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the linked_nodes hash.

Each hash contains the ROLENAME return.

ROLENAME

hash

A hash containing the role of the local server's linked cPanel server node. The hash also the role's enabled optional roles, if any exist.

Note:

  • The return's name is current role of the remote server's linked cPanel server node.
  • We added this return in cPanel & WHM version 88.

The function returns this value in the worker_capabilities hash.

A cPanel server role.

Note:

If no enabled optional roles exist, this function returns an empty hash.

Mail

server_type

string

The remote server's type.

The function returns this value in the remote hash.

  • cPanel
  • Plesk
  • Ensim
cPanel

supports_live_transfers

Boolean

Whether the remote server supports the Live Transfers feature in WHM's Transfer Tool  interface (WHM >> Home >> Transfers >> Transfer Tool).

Note:

We added this return in cPanel & WHM version 90.

The function returns this value in the  remote  hash.

  • 1 — Supported.
  • 0 — Not supported.
1
itemshashA hash of items to transfer.This hash includes the packages and accounts arrays.

packages

array

The packages to transfer.

The function returns this array in the items hash.

An array of valid package names.package1

accounts

array

The accounts to transfer.

The function returns this array in the items hash.

An array of account names.example