Manage2 API Function - Edit Group


Last modified: December 17, 2021

Description

This function edits the name and/or taxable status of an existing Manage2 group.

Examples

XML

https://manage2.cpanel.net/XMLgroupEdit.cgi?group=ExampleGroup&newgroup=NewGroupName

JSON

https://manage2.cpanel.net/XMLgroupEdit.cgi?output=json&group=ExampleGroup&newgroup=NewGroupName

YAML

https://manage2.cpanel.net/XMLgroupEdit.cgi?output=yaml&group=ExampleGroup&newgroup=NewGroupName

1
2
3
4
5
6
7
8
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]","123456luggage");
$response = (array)$cpl->editGroup( array(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
));
?>

1
2
3
4
5
6
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "[email protected]", pass => "123456luggage");
my $response = $licenseManager->editGroup(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
);

<XMLgroupEdit reason="Updated 'NewGroupName' group." status="1" />

1
2
3
4
{
    "status": 1,
    "reason": "Updated 'NewGroupName' group."
}

1
2
3
---
status: 1
reason: Updated 'NewGroupName' group.

Parameters

Important:

You must provide either the group or groupid parameter.

This function accepts the following parameters:

Parameter Type Description Example
group string Required
The group’s current name.
ExampleGroup
groupid string Required
The group’s ID.
G001
newgroup string A new group name that does not already exist. NewGroupName
maingroup Boolean Default group to which new licenses are added unless a group is explicitly defined.
Whether the maingroup is true:
  • 1 — True.
  • 0 — False.
1
country string The country of the datacenter in which licenses in the group are hosted.
Note:
Country code must be in the form of ISO 3166-1 alpha-2
US
stateprov string The state or province of the datacenter in which licenses in the group are hosted.
Note:
Code must be in the form of ISO 3166-2
TX
city string The city name the datacenter in which licenses in the group are hosted. Houston
postcode string
The post code of the address of the datacenter in which licenses in the group are hosted.
77092
addr1 string
The street number and street name of the address of the datacenter in which licenses in the group are hosted.
1234 Virtual St
addr2 string The suite or apartment number of the address of the datacenter in which licenses in the group are hosted, if applicable. 716

Returns

This function returns the following values:

Return Type Description Example
reason string A message of success or failure. Updated 'NewGroupName' group.
status Boolean Whether the function succeeded:
  • 1 — Success.
  • 0 — Failure.
1

Additional Documentation