Child pages
  • Manage2 API Functions - Display Groups
Skip to end of metadata
Go to start of metadata

Description


This function returns the Manage2 account's groups.

Examples 


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLgroupInfo.cgi
JSON
https://manage2.cpanel.net/XMLgroupInfo.cgi?output=json
YAML
https://manage2.cpanel.net/XMLgroupInfo.cgi?output=yaml
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com","12345luggage");
$lisc = $cpl->fetchGroups();
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $cpl = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage');
$cpl->fetchGroups();
 Output (XML)
<XMLgroupInfo reason="OK" status="1" version="0.5">
 <groups G105294="TestGroup" G149026="Test Group*" G150206="Can You See Them Now" G199497="Group 199497" G208850="Aura " G251754="Awesome Group" G256590="megadealhostingserver20.com" G258086="Alphasys" G268962="00 Chris Test 2012" G285750="Wired Solutions***" G313134="3rd planet blues" G313670="Brenda" G43038="Group 43038" G43039="Training Seminar Test Company*" G439107="Group" G87685="Training Sem Group 2" G87701="TSTC Group 4" G90897="sample"/>
</XMLgroupInfo>
 Output (JSON)
{
  "version": 0.5,
  "status": 1,
  "groups": {
    "G149026": "Test Group*",
    "G87701": "TSTC Group 4",
    "G150206": "Can You See Them Now",
    "G285750": "Wired Solutions***",
    "G268962": "00 Chris Test 2012",
    "G87685": "Training Sem Group 2",
    "G313134": "3rd planet blues",
    "G256590": "megadealhostingserver20.com",
    "G90897": "sample",
    "G105294": "TestGroup",
    "G199497": "Group 199497",
    "G439107": "Group",
    "G258086": "Alphasys",
    "G313670": "Brenda",
    "G43039": "Training Seminar Test Company*",
    "G43038": "Group 43038",
    "G208850": "Aura ",
    "G251754": "Awesome Group"
  },
  "reason": "OK"
}
 Output (YAML)
--- 
groups: 
  G105294: TestGroup
  G149026: Test Group*
  G150206: Can You See Them Now
  G199497: Group 199497
  G208850: "Aura "
  G251754: Awesome Group
  G256590: megadealhostingserver20.com
  G258086: Alphasys
  G268962: 00 Chris Test 2012
  G285750: Wired Solutions***
  G313134: 3rd planet blues
  G313670: Brenda
  G43038: Group 43038
  G43039: Training Seminar Test Company*
  G439107: Group
  G87685: Training Sem Group 2
  G87701: TSTC Group 4
  G90897: sample
reason: OK
status: 1
version: 0.5 

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
reasonstring

Information about the group display operation.

A string value.OK
statusBooleanWhether the function succeeded.
  • 1 — Success.

  • 0 — Failure.
1
versionnumericInternal information that the Manage2 API uses to identify the version.

A numeric value.

0.4

groupshashA hash of the account's group names and group IDs.An array of group ID numbers and names.
 Click to view...

groups G0001= "ExampleGroup" G0002= "" G0003= "Training Server*" G0003= "Training Server 2*" G0004= "Enterprise" G00005= "Enterprise 2" G0006= "Testing Server"