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

Description

This function adds a group to a Manage2 account.

Examples


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLgroupAdd.cgi?group=NewGroup&taxable=1
JSON
https://manage2.cpanel.net/XMLgroupAdd.cgi?output=json&group=NewGroup&taxable=1
YAML
https://manage2.cpanel.net/XMLgroupAdd.cgi?output=yaml&group=NewGroup&taxable=1
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("user@example.com","12345luggage");
$response = (array)$cpl->addGroup( array(
    'group'   => 'NewGroup',
    'taxable' => '1'
));
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "user@example.com", pass => "12345luggage");
my $response = $licenseManager->addGroup(
    'group'   => 'NewGroup',
    'taxable' => '1'
);
 Output (JSON)
{
    "reason": "Added 'NewGroup' group.",
    "status": 1
}
 Output (XML)
<XMLgroupAdd reason="Added 'NewGroup' group." status="1" />
 Output (YAML)
--- 
reason: Added 'NewGroup' group.
status: 1

Parameters

ParameterTypeDescriptionPossible valuesExample
groupstring

Required

The desired group name.

Note:

The group string cannot exceed 50 characters.

A valid string.

NewGroup
taxableBoolean

Required

Whether the new 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.
Added 'NewGroup' group.
statusBooleanWhether the function succeeded.
  • 1 — The function succeeded.

  • 0 — The function failed.
1