# Retrieves detailed information for a specific custom group by name Returns complete details of a custom group identified by name. Fetch the cgName from [Retrieve All Custom Groups](https://www.manageengine.com/products/desktop-central/custom-groups-get-cglist.html). For static groups, includes the list of member resources and associated domains. For dynamic groups, includes the criteria list, renderability status, and filter criteria used for automatic member population — column definitions referenced in the returned criteriaList (columnId, columnValue, comparator) are documented at [Get Dynamic CG Criteria Pattern](https://www.manageengine.com/products/desktop-central/custom-groups-get-dynamic-cgcriteria-pattern.html). ## Endpoint **GET** `/api/1.4/customgroup/getCGDetails` ## Request URL `https://{serverurl}/api/1.4/customgroup/getCGDetails` ## Scope `DesktopCentralCloud.Common.READ` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** (string, Mandatory) `application/json` Must be application/json. Only JSON responses are supported. ### Query Parameters - **cgName** (string, Mandatory) Exact name of the custom group to retrieve. Case-sensitive match. Fetch names from [Retrieve All Custom Groups](https://www.manageengine.com/products/desktop-central/custom-groups-get-cglist.html). ## Sample Request ### Curl ```bash curl --request GET \ --url 'https://appdomain/api/1.4/customgroup/getCGDetails?cgName=SOME_STRING_VALUE' \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ### Java ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; import java.net.http.HttpTimeoutException; public class Main { public static void main(String[] args) { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://appdomain/api/1.4/customgroup/getCGDetails?cgName=SOME_STRING_VALUE")) .header("Accept", "application/json") .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .method("GET", HttpRequest.BodyPublishers.noBody()) .build(); HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("appdomain") headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("GET", "/api/1.4/customgroup/getCGDetails?cgName=SOME_STRING_VALUE", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript parameters = "cgName=value"; headersMap = Map(); headersMap.put("Accept", "application/json"); response = invokeUrl [ url: "https://appDomain/api/1.4/customgroup/getCGDetails" + "?" + parameters type: GET headers: headersMap connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("Accept", "application/json") $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest -Uri 'https://appdomain/api/1.4/customgroup/getCGDetails?cgName=SOME_STRING_VALUE' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 **Response Body**: `application/json` - **message_type** (string) Always `'getCGDetails'` for this endpoint. - **message_response** (JSON object) - **getcgdetails** (JSON object) - **operation_status** (string) Operation result: `'success'` when the request completed without errors. - **response** (JSON object) - **message** (string) Fixed success string: `'Operation has been completed successfully'`. - **result** (JSON object) - **group_id** (long) Unique resource ID of the custom group. Use as cgId in [Delete CG](https://www.manageengine.com/products/desktop-central/custom-groups-delete-cg.html), as groupId in the request body of [Update Static CG](https://www.manageengine.com/products/desktop-central/custom-groups-update-static-cg.html), [Update Static Unique CG](https://www.manageengine.com/products/desktop-central/custom-groups-update-static-unique-cg.html), [Update Dynamic CG](https://www.manageengine.com/products/desktop-central/custom-groups-update-dynamic-cg.html), or as sourceCGId in [Clone Dynamic CG](https://www.manageengine.com/products/desktop-central/custom-groups-clone-dynamic-cg.html). - **group_name** (string) Display name of the custom group. - **group_type** (string) Human-readable type: `'Computers'` or `'Users'`. - **group_category** (string) `'Static'`, `'Dynamic'`, or `'Static Unique'`. - **domain_name** (string) NetBIOS domain name. `'NA'` for dynamic groups. - **group_created_on** (long) Creation timestamp in milliseconds since epoch. - **group_modified_on** (long) Last modification timestamp in milliseconds since epoch. - **domains** (array) [Static/Static Unique only] Active domains associated with this CG. - **groupMembers** (array) [Static/Static Unique] Member resources: - **resourceId** (string) - **name** (string) - **domainName** (string) - **osPlatform** (string, computer groups only) - **isRenderable** (boolean) [Dynamic only] Indicates if the SQL query can be rendered in the UI. - **criteriaList** (array) [Dynamic only] Filter criteria objects: - **columnId** (long) - **logicalOperator** (`AND` or `OR`) - **comparator** (`equal`, `not equal`, `contains`, `greater than`, etc.) - **criteriaValue** (array of strings) - **additionalValues** (object, script-based criteria only): - **exitCode** - **scriptId** - **scriptName** - **description** - **columnName** - **columnValue** - **I18NComparator** - **I18NOperator** - **columnNameI18N** - **applicableOS** - **criteriaPattern** (string) Example: `'1'`, `'1 AND 2'`, `'(1 AND 2) OR 3'`. - **message_version** (string) API version: `'1.4'`. - **status** (string) `'success'` when completed without errors. ### HTTP 204 - **error_code**: `'20015'` (group name does not exist) - **status**: `'error'` ### HTTP 412 - **error_code**: `'20011'` (group name empty) - **status**: `'error'` ### HTTP 417 - **error_code**: `'20003'` (no managed domains) - **status**: `'error'` ### HTTP 500 - **error_code**: `'1003'` (INTERNAL_ERROR) - **status**: `'error'` ## Sample Response: HTTP 200 ### Static Computer Group ```json { "message_type": "getCGDetails", "message_response": { "getcgdetails": { "response": { "result": { "groupMembers": [ { "resourceId": "101", "domainName": "CORP", "name": "SRV-DC01", "osPlatform": "1" } ], "domain_name": "CORP", "group_category": "Static", "group_id": 301, "group_name": "Windows Servers", "group_modified_on": 1710412000000, "domains": ["CORP"], "group_created_on": 1710325600000, "group_type": "Computers" }, "message": "Operation has been completed successfully" }, "operation_status": "success" } }, "message_version": "1.4", "status": "success" } ``` ## Rate Limit **Duration:** 1 minute **Threshold:** 30 **Lock period:** 5 minutes