Manage2 API Function - Edit Group


Last modified: March 16, 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&taxable=0

JSON

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

YAML

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

1
2
3
4
5
6
7
8
9
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("username@example.com","123456luggage");
$response = (array)$cpl->editGroup( array(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
    'taxable'  => '1'
));
?>

1
2
3
4
5
6
7
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "username@example.com", pass => "123456luggage");
my $response = $licenseManager->editGroup(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
    'taxable'  => '1'
);

<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, up to 50 characters. NewGroupName
taxable Boolean Whether the group’s licenses are eligible for Texas state sales tax:
  • 1 — Taxable.
  • 0 — Not taxable.
1

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