Manage2 API Function - Change a License Package
Last modified: March 16, 2021
Description
This function updates a license’s package.
Examples
Browser-based calls
XML
https://manage2.cpanel.net/XMLpackageUpdate.cgi?output=xml&ip=192.0.2.0&oldpackageid=P003&newpackageid=P002&maxusers=120
JSON
https://manage2.cpanel.net/XMLpackageUpdate.cgi?output=json&ip=192.0.2.0&oldpackageid=P003&newpackageid=P002&maxusers=120
YAML
https://manage2.cpanel.net/XMLpackageUpdate.cgi?output=yaml&ip=192.0.2.0;oldpackageid=P003;newpackageid=P002&maxusers=120
cPanelLicensing PHP Class
|
|
cPanelLicensing Perl Module
|
|
Output (XML)
<XMLpackageUpdate status="1" reason="Updated package on 192.0.2.0 from 15-DAY-TEST to COMPANY-INTERNAL-VPS."/>
Output (JSON)
|
|
Output (YAML)
|
|
Parameters
Important:
If more than one license uses the given IP address, you must provide the oldpackageid
parameter.
This function accepts the following parameters:
Parameter | Type | Description | Example |
---|---|---|---|
ip |
string | Required The license’s current IP address. | 192.0.2.0 |
newpackageid |
string | Required The new package’s ID. The Manage2 List Package Information function returns a list of possible values. | P002 |
oldpackageid |
string | Required The license’s current package’s ID. The Manage2 List Package Information function returns a list of possible values. If you do not use this parameter, the system attempts to determine the package ID for the supplied IP address. |
P003 |
maxusers |
integer | The maximum number of users allowed on the license.
|
120 |
Returns
This function returns the following values:
Return | Type | Description | Example |
---|---|---|---|
reason |
string | Whether the function updated the package. | Updated package on 192.0.2.0 from 15-DAY-TEST to COMPANY-INTERNAL-VPS. |
status |
Boolean | Whether the function succeeded:
|
1 |