Manage2 API Function - Group Update
Last modified: May 20, 2024
Description
This function associates a license or collection of licenses with a group.
Note:
- We introduced this function in cPanel License (CPL) client library version 3.8.
- You cannot use this function to associate a
Group Limited
user. To set a user’s group permissions, use Manage2’s Edit Users interface.
Examples
Browser-based calls
XML
https://manage2.cpanel.net/XMLgroupUpdate.cgi?ip=192.0.2.0&packageid=008&group=ExampleGroup
JSON
https://manage2.cpanel.net/XMLgroupUpdate.cgi?output=json&ip=192.0.2.0&packageid=008&group=ExampleGroup
YAML
https://manage2.cpanel.net/XMLgroupUpdate.cgi?output=yaml&ip=192.0.2.0&packageid=008&group=ExampleGroup
cPanelLicensing PHP Class
|
|
cPanelLicensing Perl Module
|
|
Output (XML)
<XMLgroupUpdate groupid="8" reason="Updated 1 license to the "ExampleGroup" group." status="1" />
Output (JSON)
|
|
Output (YAML)
|
|
Parameters
Important:
This function requires one of the following parameters:
ip
package
packageid
oldgroup
oldgroupid
This function also requires either of the following parameters:
group
groupid
This function accepts the following parameters:
Parameter | Type | Description | Example |
---|---|---|---|
ip |
string | Required The license’s IP address. The Manage2 List License Information function returns a list of possible values.
Note:
If both cPanel and CloudLinux™ licenses exist on the named IP, this function updates both licenses. To update a single license type, you must specify additional parameters.
|
192.0.2.0 |
package |
string | The package’s name. | ONE-YEAR |
packageid |
integer | The package’s ID number. The Manage2 List Package Information function returns a list of possible values. | 008 |
oldgroup |
string | The license’s current group name. The Manage2 Display Groups function returns a list of possible values. | test |
oldgroupid |
integer | The license’s current group ID number. The Manage2 Display Groups function returns a list of possible values. | 12345 |
group |
string | The license’s new associated group. The Manage2 Display Groups function returns a list of possible values.
Note:
The
group value that you pass must already exist.
|
ExampleGroup |
groupid |
integer | The license’s new associated group’s ID. The Manage2 Display Groups function returns a list of possible values.
Note:
The
groupid value that you pass must already exist.
|
54321 |
Returns
This function returns the following values:
Return | Type | Description | Example |
---|---|---|---|
reason |
string | License activation information. | Updated 1 license to the "ExampleGroup" group. |
status |
Boolean | Whether the system accepts the request as valid:
|
1 |