Manage2 API Function - Extend One Time Licenses
Last modified: December 7, 2022
Description
This function extends one-time licenses for one year.
Examples
Browser-based calls
XML
https://manage2.cpanel.net/XMLonetimeext.cgi?ip=192.0.2.0
JSON
https://manage2.cpanel.net/XMLonetimeext.cgi?output=json&ip=192.0.2.0
YAML
https://manage2.cpanel.net/XMLonetimeext.cgi?output=yaml&ip=192.0.2.0
cPanelLicensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]","123456luggage");
$lisc = $cpl->extendOnetime(array( "ip" => "192.0.2.01" ) );
?>
cPanelLicensing Perl Module
use cPanelLicensing;
my $licenseManager = new cPanelLicensing(user => 'username\@example.com', pass => '123456luggage');
$licenseManager->extend_onetime_updates (
'ip' => '192.0.2.0'
);
Output (XML)
<XMLonetimeext reason="Dispatched notification Updates have been extended for the license on ip: 192.0.2.01. The old updates experiation time was: Mon Jul 11 03:27:02 2020 GMT. The new updates expiration time is: Tue Jul 10 03:27:02 2021 GMT. If your updates have already expired, you should run /usr/local/cpanel/cpkeyclt to reenable updates." status="1" version="0.1"/>
Output (JSON)
{
"version": 0.1,
"status": 0,
"reason": "Dispatched notification Updates have been extended for the license on ip: 192.0.2.01. The old updates experiation time was: Mon Jul 11 03:27:02 2020 GMT. The new updates expiration time is: Tue Jul 10 03:27:02 2021 GMT. If your updates have already expired, you should run /usr/local/cpanel/cpkeyclt to reenable updates."
}
Output (YAML)
---
version: 0.1
status: 0
reason: 'Dispatched notification Updates have been extended for the license on ip: 192.0.2.01. The old updates experiation time was: Mon Jul 11 03:27:02 2020 GMT. The new updates expiration time is: Tue Jul 10 03:27:02 2021 GMT. If your updates have already expired, you should run /usr/local/cpanel/cpkeyclt to reenable updates.'
Parameters
This function accepts the following parameters:
Parameter | Type | Description | Example |
---|---|---|---|
ip |
string | Required The license account’s IP address. The Manage2 List License Information function returns a list of possible values. | 192.0.2.01 |
Returns
This function returns the following values:
Return | Type | Description |
Example |
---|---|---|---|
reason |
string | The function’s result. | Dispatched notification Updates have been extended for the license on ip: 192.0.2.01. The old updates experiation time was: Mon Jul 11 03:27:02 2020 GMT. The new updates expiration time is: Tue Jul 10 03:27:02 2021 GMT. If your updates have already expired, you should run /usr/local/cpanel/cpkeyclt to reenable updates. |
status |
Boolean | Whether the function succeeded:
|
1 |
version |
numeric | Internal information that the Manage2 API uses. | 0.1 |