Creates a copy of an existing dynamic custom group

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

Clones an existing dynamic custom group by copying its criteria pattern to a new group with the specified name and description. Only computer-type dynamic groups can be cloned via this endpoint — static, static-unique, and user-type dynamic groups are not supported (dynamic custom groups only support computer-type; user-type dynamic groups do not exist). The source group must exist and be accessible to the caller. The new group name must not already exist. Members of the cloned group are populated by re-evaluating the copied criteria, not by copying members from the source. Prerequisites: Call Retrieve All Custom Groups to look up the sourceCGId of the dynamic group you want to clone (filter for group_category='Dynamic' in the returned cg_list).

Request URL

https://{serverurl}/api/1.4/customgroup/dynamic/clone

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
groupNamestringMandatory

Name for the cloned group. Max 100 chars. Must be unique.

descriptionstringOptional

Description. Max 250 chars.

sourceCGIdlongMandatory

Resource ID of the source dynamic group. Must exist, be dynamic, and be accessible. Fetch from Retrieve All Custom Groups.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/1.4/customgroup/dynamic/clone \
  --header 'Accept: application/json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"groupName":"Windows 11 PCs - Copy","sourceCGId":302}'
Show full

Sample Request Body

Clone a dynamic group, copying all its criteria to a new group.

Copied!
  {
    "groupName": "Windows 11 PCs - Copy",
    "sourceCGId": 302,
    "description": "Cloned from Windows 11 PCs for testing"
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'dynamic' for this endpoint.

message_responseJSON object

Response payload container.

Show Sub-Attributes
dynamicJSON object

Response payload.

Show Sub-Attributes
cgResourceIdstring

Newly assigned resource ID for the cloned group (returned as string). Use as cgId in Delete CG, or as groupId in the request body of Update Dynamic CG.

groupNamestring

Name of the cloned group (echoed from request).

groupCategorystring

Always 2 (Dynamic, returned as integer not string) — only dynamic groups can be cloned. Note: addCg returns this as string '2'.

groupTypestring

Always 'Computer' (display name, not numeric). Note: addCg returns this as numeric string '1'. Only computer-type dynamic groups can be cloned.

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 'dynamic' 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.'.

- HTTP code 412

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'dynamic' for this endpoint.

message_versionstring

API version: '1.4'.

statusstring

Always 'error' for error responses.

error_codestring

'70502' (CG_DUPLICATE_NAME).

error_descriptionstring

Resolved I18N message: 'Custom group name is already in use.'.

- HTTP code 500

Response Body - application/json


JSON object
Hide Sub-Attributes
message_typestring

Always 'dynamic' 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

New group created with same criteria as source.

Copied!
  {
    "message_type": "dynamic",
    "message_response": {
      "dynamic": {
        "groupName": "Windows 11 PCs - Copy",
        "groupType": "Computer",
        "groupCategory": 2,
        "cgResourceId": "305"
      }
    },
    "message_version": "1.4",
    "status": "success"
  }
                
Show full

Sample Response: HTTP 404

sourceCGId does not exist, is not dynamic, or user lacks access.

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

Sample Response: HTTP 412

A group with this name already exists.

Copied!
  {
    "error_description": "Custom group name is already in use.",
    "message_type": "dynamic",
    "error_code": "70502",
    "message_version": "1.4",
    "status": "error"
  }
                
Show full

Sample Response: HTTP 500

Unexpected server-side failure during clone.

Copied!
  {
    "error_description": "An internal error occurred while processing the request.",
    "message_type": "dynamic",
    "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.