Request a License Transfer — XMLtransferRequest.cgi

This Manage2 function allows you to request that a license be transferred between companies. This can be useful if you wish to move your cPanel service from one web host to another.

Variables

Input

  • groupid (string) — The group ID of the license you wish to transfer.
    • Example: 0001
  • packageid (string) — The package ID of the license you wish to transfer.
    • Example: 0001
  • ip (string) — The IP address of the license you wish to transfer.
    • Example: 127.0.0.1

Output

  • reason (string) — Details about the transfer request.
  • status (integer) — Whether or not the request to transfer was made successfully.
    • 1 — The request was made successfully.
    • 0 — The request was not made.
    • -1 — The request was not made because you entered invalid input data.
  • version (float) — Internal information used by the Manage2 API.

Examples

Using HTTP (direct API call)

Show Hide

Calling http://manage2.cpanel.net/XMLtransferRequest.cgi?groupid=G0001&packageid=P0001&ip=127.0.0.1 in a web browser will produce XML output similar to the following:

<XMLtransferRequest reason="The Name of a Company has been 
contacted.  You will receive notice via email once our 
staff reviews their response.  The confirmation number 
for this request is 5562." status="1" version="0.2"/>

Calling the function using the URL above will return XML data by default. To change the output format that will be returned, use either of the following URLs:

  • JSONhttp://manage2.cpanel.net/XMLtransferRequest.cgi?output=json&groupid=G0001&packageid=P0001&ip=127.0.0.1
  • YAMLhttp://manage2.cpanel.net/XMLtransferRequest.cgi?output=yaml&groupid=G0001&packageid=P0001&ip=127.0.0.1
For more information about each of these output types, visit our Choosing an Output Type documentation.

Using a Perl module

Show Hide

The following is an example of a Perl module that will call XMLtransferRequest.cgi. You can use this module to pass input variables to a Manage2 API function. You will need to edit the example below to suit your needs.

use cPanelLicensing;
    my $cpl = cPanelLicensing->new(user => $user, pass => $pass);
    $cpl->requestTransfer(
groupid=>$groupid
packageid=>$packageid
ip=>$ip
)

In the example above:

  • $ip — The IP address for which you would like to request the transfer.
  • $groupid — The group ID of the license you wish to transfer.
  • $packageid — The package ID of the license you wish to transfer.

You can learn more about using a Perl module to call API functions.

Using a PHP class

Show Hide

The following is an example showing how to call the cPanelLicensing PHP class. You can use this class to pass input variables to the Manage2 API using a few short calls.

<?php

include("cpl.inc.php");

$cpl = new cPanelLicensing("__USERNAME__","__PASSWORD__");
$lisc = $cpl->requestTransfer(array(
		"ip" = $ip,
		"groupid" => $groupid,
		"packageid" => $packageid
	)
);

?>

In the example above:

  • $ip — The IP address for which you would like to request the transfer.
  • $groupid — The group ID of the license you wish to transfer.
  • $packageid — The package ID of the license you wish to transfer.

PICK Remember: __USERNAME__ and __PASSWORD__ are meant to represent the username and password for your Manage2 account.

You can learn more about using a PHP class to call API functions.

Topic revision: r17 - 22 Apr 2011 - 00:31:45 - Main.JustinSchaefer
ManageTwo.XMLRequestTransfer moved from Sandbox.XMLRequestTransfer on 21 Jul 2009 - 19:12 by Main.JustinSchaefer - put it back
 

Copyright © cPanel 2000–2011.