Expire Licenses — XMLlicenseExpire.cgi

This Manage2 function allows you to expire an existing license. When a license is expired, WHM and cPanel cannot be accessed on that license's IP.

Variables

Input

  • liscid (string) — The ID number of the license you wish to expire.
    • Example: L0001
  • reason (string) — The reason for expiring the license.
    • note Note: This is useful when managing multiple licenses.
  • expcode (string) — The reason code for expiring the license (distributors only).
    • Valid Codes:
      • normal (Normal Cancellation - No Security Risk)
      • nocomplete (Customer did not complete transaction - No Security Risk)
      • noverify (Customer did not complete transaction or you were unable to verify the customer - Security Risk)
      • shutoff (Customer did not comply with policies (spam, payment, etc) - Security Risk)
      • chargeback (Customer reversed charged - Medium Security Risk)
      • fraud (Customer provided compromised or fraudulent information - High Security Risk)
      • other

Output

  • licenseid (string) — The ID of the license that has been expired.
  • reason (string) — Describes, in English, the result of the request.
    • Example: OK
  • result (string) — Information about the license expiration. This includes the IP address, license ID, and reason for expiration.
  • status (integer) — The status of the license expiration.
    • 1 — The license has been successfully expired.
    • 0 — The request has failed.
    • -1 — The license has not been expired.

Examples

Using HTTP (direct API call)

Show Hide

Calling http://manage2.cpanel.net/XMLlicenseExpire.cgi?liscid=L555555&reason=Delinquent_Account in a web browser will produce XML output similar to the following:

<XMLlicenseExpire licenseid="555555" reason="OK" 
result="Expired license 127.0.0.1liscid 555555 by user 
for reason: 'Delinquent_Account'" 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/XMLlicenseExpire.cgi?output=json&liscid=L555555&reason=Delinquent_Account
  • YAMLhttp://manage2.cpanel.net/XMLlicenseExpire.cgi?output=yaml&liscid=L555555&reason=Delinquent_Account
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 XMLlicenseExpire.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->expireLicense(liscid => $liscid, reason => $reason); 

In the example above, $liscid is meant to stand for the license ID corresponding to the license you wish to expire. $reason is meant to stand for the reason that the license is being expired.

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.

&lt;?php

include("cpl.inc.php");

$cpl = new cPanelLicensing("__USERNAME__","__PASSWORD__"); $lisc = $cpl-&gt;expireLicense(array( "liscid" =&gt;$liscid, "reason" =&gt; $reason ) );

?&gt;

In the example above, $liscid is meant to stand for the license ID corresponding to the license you wish to expire. $reason is meant to stand for the reason that the license is being expired.

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 - 20 Apr 2011 - 15:27:58 - Main.MelanieSeibert
ManageTwo.ExpireLicense moved from Sandbox.ExpireLicense on 21 Jul 2009 - 19:13 by Main.JustinSchaefer - put it back
 

Copyright © cPanel 2000–2011.