Reactivate expired licenses — XMLlicenseReActivate.cgi

This Manage2 function allows you to reactivate an expired license.

Variables

Input

  • liscid (string) — The ID of the license you wish to reactivate.
    • Example: L0001
  • reactivateok (boolean) — Confirms that the license should be reactivated and the account should be charged.
    • 0 — The license will not be added, no fee will be charged.
    • 1 — The license will be added and the fee will be charged.
  • force (boolean) — When 1, forces the license to be reactivated.
    • note Note: A billing adjustment will be made to your account if the license was deactivated within 48 hours prior to your last billing date.

Output

  • licenseid (string) — The ID of the license that has been reactivated.
    • Example: 0001
  • reason (string) — Describes, in English, the result of the request.
    • Example: OK
  • status (integer) — The status of the license reactivation.
    • 1 — The license has been successfully reactivated.
    • 0 — The request has failed.
    • -1 — The license has not been reactivated.
  • billed (float) — The amount billed to your account for license reactivation.
    • Example: 22.5

Examples

Using HTTP (direct API call)

Show Hide

Calling http://manage2.cpanel.net/XMLlicenseReActivate.cgi?liscid=L0001&reactivateok=1 in a web browser will produce XML output similar to the following:

<XMLlicenseReActivate licenseid="0001" reason="OK" status="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:

  • JSONhttp://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=json&liscid=L0001
  • YAMLhttp://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=yaml&liscid=L0001
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 XMLlicenseReActivate.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);
    my $licenseid = $cpl->reactivateLicense(
        liscid => $liscid,
        reactivateok => $reactivateok);
    print "$licenseid\n";

In this example, $liscid is meant to stand for the ID of the license you wish to reactivate. $reactivateok is a boolean value that indicates that you confirm that license should be reactivated.

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->reactivateLicense(array(
		"liscd" => $liscid,
		"reactivateok" => $reactivateok
	)
);

?>

In the example above, $id is meant to stand for the license ID of the license you wish to reactivate. $reactivateok is a boolean value that indicates that you confirm that license should be reactivated.

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: r23 - 20 Sep 2011 - 21:50:12 - Main.LindseyLWhite
ManageTwo.XMLReactivateLicense moved from Sandbox.XMLReactivateLicense on 21 Jul 2009 - 19:13 by Main.JustinSchaefer - put it back
 

Copyright © cPanel 2000–2011.