# Retrieves the list of all custom groups Returns details of all custom groups including group ID, name, type (Computers/Users), category (Static/Dynamic/Static Unique), associated domain, and creation/modification timestamps. By default, auto-generated system groups (All Computers, All Users) are excluded. The returned groupId values can be passed as cgId to [Delete CG](https://www.manageengine.com/products/desktop-central/help/api/onpremise/custom-groups-delete-cg.html) or as groupId in the request body of [Update Static CG](https://www.manageengine.com/products/desktop-central/help/api/onpremise/custom-groups-update-static-cg.html), [Update Static Unique CG](https://www.manageengine.com/products/desktop-central/help/api/onpremise/custom-groups-update-static-unique-cg.html), or [Update Dynamic CG](https://www.manageengine.com/products/desktop-central/help/api/onpremise/custom-groups-update-dynamic-cg.html). The returned groupName values can be used with [Retrieve Custom Group Details](https://www.manageengine.com/products/desktop-central/help/api/onpremise/custom-groups-get-cgdetails.html). ## Endpoint `GET /api/1.4/customgroup/getCGList` ## Request ### Request URL `https://{server-hostname}:8383/api/1.4/customgroup/getCGList` ### Scope `Common.READ` ### Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Accept** `string` — **Mandatory** - `application/json` - Must be application/json. Only JSON responses are supported. ### Sample Request ```curl curl --request GET \ --url https://appdomain/api/1.4/customgroup/getCGList \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` - `JSON Object` - **message_type** `string` - Always 'getCGList' for this endpoint. - **message_response** `JSON Object` - Response payload container. - **message_version** `string` - API version: '1.4'. - **status** `string` - 'success' when the request completed without errors. ### HTTP Code 204 Response body: `application/json` - `JSON Object` - **message_type** `string` - Always 'getCGList' for this endpoint. - **message_version** `string` - API version: '1.4'. - **status** `string` - Always 'error' for error responses. - **error_code** `string` - Internal error code: '20012' (no custom groups found). - **error_description** `string` - Human-readable error message. ### HTTP Code 417 Response body: `application/json` - `JSON Object` - **message_type** `string` - Always 'getCGList' for this endpoint. - **message_version** `string` - API version: '1.4'. - **status** `string` - Always 'error' for error responses. - **error_code** `string` - Internal error code: '20003' (no managed domains). - **error_description** `string` - Human-readable error message. ### HTTP Code 500 Response body: `application/json` - `JSON Object` - **message_type** `string` - Always 'getCGList' for this endpoint. - **message_version** `string` - API version: '1.4'. - **status** `string` - Always 'error' for error responses. - **error_code** `string` - Internal error code: '1003' (INTERNAL_ERROR). - **error_description** `string` - Resolved I18N message, typically: An internal error occurred while processing the request. ### Possible Response Codes - **200** — HTTP code - **204** — HTTP code - **417** — HTTP code - **500** — HTTP code ## Sample Responses ### HTTP 200 List with static, dynamic, static unique computer and user groups. ```json { "message_type": "getCGList", "message_response": { "getcglist": { "response": { "result": { "cg_list": [ { "domain_name": "CORP", "group_category": "Static", "group_id": 301, "group_name": "Windows Servers", "group_modified_on": 1710412000000, "group_created_on": 1710325600000, "group_type": "Computers" }, { "domain_name": "NA", "group_category": "Dynamic", "group_id": 302, "group_name": "Windows 11 PCs", "group_modified_on": 1710500000000, "group_created_on": 1710325600000, "group_type": "Computers" }, { "domain_name": "CORP", "group_category": "Static Unique", "group_id": 303, "group_name": "Finance OU Computers", "group_modified_on": 1710500000000, "group_created_on": 1710240000000, "group_type": "Computers" }, { "domain_name": "CORP", "group_category": "Static", "group_id": 304, "group_name": "HR Users", "group_modified_on": 1710150000000, "group_created_on": 1710150000000, "group_type": "Users" } ] }, "message": "Operation has been completed successfully" }, "operation_status": "success" } }, "message_version": "1.4", "status": "success" } ``` List including auto-generated All Computers group when isAutoGeneratedCGNeeded=true. ```json { "message_type": "getCGList", "message_response": { "getcglist": { "response": { "result": { "cg_list": [ { "domain_name": "NA", "group_category": "All Computer/User Group", "group_id": 1, "group_name": "All Computers", "group_modified_on": 1710500000000, "group_created_on": 1700000000000, "group_type": "Computers" }, { "domain_name": "CORP", "group_category": "Static", "group_id": 301, "group_name": "Windows Servers", "group_modified_on": 1710412000000, "group_created_on": 1710325600000, "group_type": "Computers" } ] }, "message": "Operation has been completed successfully" }, "operation_status": "success" } }, "message_version": "1.4", "status": "success" } ``` ### HTTP 204 No manually created custom groups exist in the system. ```json { "error_description": "No custom groups found", "message_type": "getCGList", "error_code": "20012", "message_version": "1.4", "status": "error" } ``` ### HTTP 417 Server has no managed AD/workgroup domains configured. ```json { "error_description": "No managed domain(s) available", "message_type": "getCGList", "error_code": "20003", "message_version": "1.4", "status": "error" } ``` ### HTTP 500 Unexpected server-side failure retrieving custom group list. ```json { "error_description": "An internal error occurred while processing the request.", "message_type": "getCGList", "error_code": "1003", "message_version": "1.4", "status": "error" } ``` ## Rate Limit ![Help](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.