Child pages
  • Manage2 API Functions - Edit Group
Skip to end of metadata
Go to start of metadata

Description

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

Examples


 Browser-based Calls
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
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("user@example.com","12345luggage");
$response = (array)$cpl->editGroup( array(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
    'taxable'  => '1'
));
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "user@example.com", pass => "12345luggage");
my $response = $licenseManager->editGroup(
    'group'    => 'ExampleGroup',
    'newgroup' => 'NewGroupName',
    'taxable'  => '1'
);
 Output (JSON)
{  
   "status":1,
   "reason":"Updated 'NewGroupName' group."
}
 Output (XML)
<XMLgroupEdit reason="Updated 'NewGroupName' group." status="1" />
 Output (YAML)
--- 
reason: Updated 'NewGroupName' group.
status: 1

Parameters

ParameterTypeDescriptionPossible valuesExample
groupstring

Required

The group's current name.

Note:

You must provide either the group or groupid parameter. 

A valid group.

ExampleGroup
groupidstring

Required

The group's ID.

Note:

You must provide either the group or groupid parameter.

A valid group ID.G001
newgroupstring

The new desired group name.

Notes:

  • The newgroup string cannot exceed 50 characters.
  • You must enter a group name that does not already exist.
A valid string.NewGroupName
taxableBoolean

Whether the group's licenses are eligible for Texas state sales tax.

  • 1 — Taxable.
  • 0 — Not taxable.
1

 

Returns

ReturnTypeDescriptionPossible valuesExample
reasonstringA message of success or failure.A string value.
Updated 'NewGroupName' group.
statusBooleanWhether the function succeeded.
  • 1 — The function succeeded.

  • 0 — The function failed.
1