Manage2 API Function - Add Group
Last modified: December 17, 2021
Description
This function adds a group to a Manage2 account.
Examples
Browser-based calls
XML
https://manage2.cpanel.net/XMLgroupAdd.cgi?group=NewGroup
JSON
https://manage2.cpanel.net/XMLgroupAdd.cgi?output=json&group=NewGroup
YAML
https://manage2.cpanel.net/XMLgroupAdd.cgi?output=yaml&group=NewGroup
cPanelLicensing PHP Class
|
|
cPanelLicensing Perl Module
|
|
Output (XML)
<XMLgroupAdd reason="Added 'NewGroup' group." status="1" />
Output (JSON)
|
|
Output (YAML)
|
|
Parameters
This function accepts the following parameters:
Parameter | Type | Description | Example |
---|---|---|---|
group |
string | Required The desired group name, up to 50 characters. | NewGroup |
maingroup |
Boolean | Default group to which new licenses are added unless a group is explicitly defined. Whether the maingroup is True:
|
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. | Added 'NewGroup' group. |
status |
Boolean | Whether the function succeeded:
|
1 |