Change a License's IP Address — XMLtransfer.cgi
This Manage2 function allows you to transfer an existing license from one IP address to another.
- oldip (string) — The original IP address of the license.
- newip (string) — The new IP address of the license.
- packageid (string) — The package ID of the license you wish to transfer. If it is not provided, all active licenses on the
oldip will be transferred.
- Note: This variable is optional if there is only one package on the old IP address.
- force (boolean) — Transfers the license, even if it will add a charge when the new IP has been deactivated within 48 hours of billing.
1 — Results in a forced transfer.
0 — Does not force a transfer.
- dryrun (boolean) — Shows information about which licenses would be transferred, without transferring any licenses.
1 — Shows the information, without activating the license.
0 — Activates the transfer. If
force is required, the transfer will not activate.
- oldip (string) — The license's old IP address.
- newip (string) — The license's new IP address.
- status (boolean) — The status of the license transfer.
1 — The license has been successfully transferred.
0 — The request has failed.
- reason (string) — Describes, in English, the result of the request.
Transferred TRAININGSEMINAR-INTERNAL license 6794006 in the 'Test Group*' group on 18.104.22.168 to 22.214.171.124.
Using HTTP (direct API call)
in a web browser will produce XML output similar to the following:
<XMLtransfer oldip="127.0.0.0" newip="127.0.0.1" status="1"
reason="Transferred TRAININGSEMINAR-INTERNAL license 6794006
in the 'Test Group*' group on 127.0.0.0 to 127.0.0.1."/>
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:
- JSON —
- YAML —
For more information about each of these output types, visit our Choosing an Output Type
Using a Perl module
The following is an example of a Perl module that will call
. You can use this module to pass input variables to a Manage2 API function.
Learn more about using a Perl module to call API functions
my $cpl = cPanelLicensing->new(user => $user, pass => $pass);
$cpl->changeip(oldip => "127.0.0.0", newip => "127.0.0.1");
Using a PHP class
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.
Learn more about using a PHP class to call API functions
$cpl = new cPanelLicensing($user, $pass);
$cpl->changeip(array("oldip" => "127.0.0.0", "newip" => "127.0.0.1"));
Topic revision: r16 - 21 Feb 2013 - 19:23:37 - Main.ColinShannon
ManageTwo.XMLTransferIP moved from Sandbox.XMLTransferIP on 21 Jul 2009 - 19:12 by Main.JustinSchaefer
- put it back