Updates a dynamic custom group's name, description, or criteria list

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Updates a dynamic custom group (groupCategory=2). Requires groupId. Only computer-type dynamic groups exist (user-type dynamic is not supported). The criteriaList field replaces all existing criteria entirely — members are re-evaluated after update. If criteriaPattern is omitted, the existing join pattern stored on the group is preserved. Important: Do not include groupType or groupCategory in the request body — these are immutable after creation and will be rejected. Prerequisites: Call Get Dynamic CG Criteria Pattern to discover available columns and operators, and Get Dynamic CG Column Values to fetch valid comparison values.

Request URL

https://{serverurl}/api/1.4/customgroup/updateCg

Scope

DesktopCentralCloud.Common.UPDATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!

Must be application/json. Request body must be valid JSON.

AcceptstringMandatory
application/jsonapplication/jsonCopied!

Must be application/json. Only JSON responses are supported.

- Request Body

application/json
JSON object
Hide Sub-Attributes
groupIdlongMandatory

Resource ID of the group to update. Fetch from Retrieve All Custom Groups.

groupNamestringOptional

Updated group name. Max 100 chars.

descriptionstringOptional

Updated description. Max 250 chars.

criteriaListJSON arrayMandatory

Replaces existing criteria entirely. Members will be re-evaluated. Fetch available columns/operators from Get Dynamic CG Criteria Pattern.

Show Sub-Attributes
JSON object
Show Sub-Attributes
columnIdlongMandatory

Criteria column ID. Fetch from Get Dynamic CG Criteria Pattern. Column IDs are instance-specific — never hardcode them, always discover via the criteriaPattern endpoint.

logicalOperatorstringMandatory

How this criteria joins with the next: 'AND' (both must match) or 'OR' (either matches).

comparatorstringMandatory

Comparison operator. Fetch applicable operators from Get Dynamic CG Criteria Pattern via applicableCriteriaType[].value. Values: 'equal', 'not equal', 'contains', 'not contains', 'starts with', 'not starts with', 'ends with', 'greater than', 'greater or equal', 'less than', 'less or equal', 'between', 'not between', 'on', 'after', 'before'.

criteriaValuearrayMandatory

Array of string values to compare against. Multiple values act as OR within this criteria. Fetch available values from Get Dynamic CG Column Values.

additionalValuesJSON objectOptional

[Script-based criteria only] Script execution parameters: exit code, script ID, name, and description.

Show Sub-Attributes
exitCodestringOptional

Comma-separated expected exit codes (e.g., '0' for success, '0,1' for success or warning).

scriptIdstringOptional

Resource ID of the custom script in the scripts repository.

scriptNamestringOptional

File name of the script (e.g., 'ComplianceCheck.bat').

descriptionstringOptional

Human-readable description of what the script checks.

criteriaPatternstringOptional

Updated criteria join pattern using 1-based indices (e.g., '1 AND 2'). If omitted, the existing pattern stored on the group is reused.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/1.4/customgroup/updateCg \
  --header 'Accept: application/json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"groupId":302,"criteriaList":[{"comparator":"contains","logicalOperator":"AND","columnId":1,"criteriaValue":["Windows 11"]},{"comparator":"equal","logicalOperator":"AND","columnId":3,"criteriaValue":["64-bit"]}]}'
Show full

Sample Request Body

Change criteria from a single OS filter to OS and architecture combined.

Copied!
  {
    "groupName": "Windows 11 PCs",
    "groupId": 302,
    "description": "Updated - Windows 11 64-bit workstations only",
    "criteriaList": [
      {
        "comparator": "contains",
        "logicalOperator": "AND",
        "columnId": 1,
        "criteriaValue": [
          "Windows 11"
        ]
      },
      {
        "comparator": "equal",
        "logicalOperator": "AND",
        "columnId": 3,
        "criteriaValue": [
          "64-bit"
        ]
      }
    ],
    "criteriaPattern": "1 AND 2"
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'updateCg' for this endpoint.

message_responseJSON object

Response payload container.

Show Sub-Attributes
updatecgJSON object

Response payload.

Show Sub-Attributes
cgResourceIdstring

Resource ID of the updated group (returned as string). Use as cgId in Delete CG, or as groupId in a subsequent Update Dynamic CG call.

groupNamestring

Current name after update.

message_versionstring

API version: '1.4'.

statusstring

'success' when the request completed without errors.

- HTTP code 404

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'updateCg' for this endpoint.

message_versionstring

API version: '1.4'.

statusstring

Always 'error' for error responses.

error_codestring

'70506' (CG_INVALID_DETAILS_TO_UPDATE).

error_descriptionstring

Resolved I18N message: 'No such Custom Group found.' -- group does not exist, user is out of scope, or group is invalid for current product edition.

- HTTP code 412

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'updateCg' for this endpoint.

message_versionstring

API version: '1.4'.

statusstring

Always 'error' for error responses.

error_codestring

'70501' (CG_CREATE_UPDATE_PARAMS_MISSING), '70502' (CG_DUPLICATE_NAME), '70509' (CG_DUMMY_CG_RENAME), '70503' (CG_NULL_CRITERIA_PATTERN), '70517' (CG_INVALID_CRITERIA_PATTERN), '70508' (CG_MORE_COMPUTERS_DUMMY_CG), '70513' (CG_INVALID_CREATION_MODE).

error_descriptionstring

Resolved I18N message varies by error code: 'Required parameters are missing to create/update Custom Group.' (70501), 'Custom group name is already in use.' (70502), 'All Features Group cannot be renamed.' (70509), 'Criteria pattern is empty.' (70503), 'Invalid criteria pattern.' (70517), 'Computer limit exceeded for free edition.' (70508), 'Only manually created Custom Group is allowed to be accessed using external apis.' (70513).

- HTTP code 500

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'updateCg' for this endpoint.

message_versionstring

API version: '1.4'.

statusstring

Always 'error' for error responses.

error_codestring

Internal error code: '1003' (INTERNAL_ERROR).

error_descriptionstring

Resolved I18N message, typically: An internal error occurred while processing the request.

Possible Response Codes

200HTTP code
404HTTP code
412HTTP code
500HTTP code

Sample Response: HTTP 200

Criteria updated and member re-evaluation triggered.

Copied!
  {
    "message_type": "updateCg",
    "message_response": {
      "updatecg": {
        "groupName": "Windows 11 PCs",
        "cgResourceId": "302"
      }
    },
    "message_version": "1.4",
    "status": "success"
  }
                
Show full

Sample Response: HTTP 404

Group ID does not exist or user lacks access.

Copied!
  {
    "error_description": "No such Custom Group found.",
    "message_type": "updateCg",
    "error_code": "70506",
    "message_version": "1.4",
    "status": "error"
  }
                
Show full

Sample Response: HTTP 412

groupId or criteriaList is missing.

Copied!
  {
    "error_description": "Required parameters are missing to create/update Custom Group.",
    "message_type": "updateCg",
    "error_code": "70501",
    "message_version": "1.4",
    "status": "error"
  }
                
Show full

Sample Response: HTTP 500

Unexpected server-side failure during update.

Copied!
  {
    "error_description": "An internal error occurred while processing the request.",
    "message_type": "updateCg",
    "error_code": "1003",
    "message_version": "1.4",
    "status": "error"
  }
                
Show full

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.