ModifyGroup

Last updated: 2021-01-18 14:23:39

1. API Description

Domain name for API request: iai.tencentcloudapi.com.

This API is used to modify the name, tag, and custom description field of a group.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: ModifyGroup.
Version Yes String Common parameter. The value used for this API: 2020-03-03.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
GroupId Yes String Group ID, which is the GroupId in the CreateGroup API.
GroupName No String Group name
GroupExDescriptionInfos.N No Array of GroupExDescriptionInfo Custom description field of the group to be modified, which is a key-value pair.
Tag No String Group remarks

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying group

This example shows you how to modify the name, tag, and custom description field of a group.

Input Example

https://iai.tencentcloudapi.com/?Action=ModifyGroup
&GroupId=ZhuYuanDormitoryNo1
&GroupName=Dormitory Building #1, Zhuyuan Campus, XX University
&Tag=Graduates
&GroupExDescriptionInfos.0.GroupExDescriptionIndex=0
&GroupExDescriptionInfos.0.GroupExDescription=School
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "da051f16-0400-49d4-9832-2cfd3b51866f"
  }
}

Example2 Modifying group - 2

This example shows you how to modify the name, tag, and custom description field of a group.

Input Example

https://iai.tencentcloudapi.com/?Action=ModifyGroup
&GroupId=TencentShenZhenEmployee
&GroupName=Current Tencent Employees in Shenzhen
&Tag=Including interns
&GroupExDescriptionInfos.0.GroupExDescriptionIndex=1
&GroupExDescriptionInfos.0.GroupExDescription=Department
&GroupExDescriptionInfos.1.GroupExDescriptionIndex=2
&GroupExDescriptionInfos.1.GroupExDescription=Project team
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "98381738-509f-4749-8a66-dbf54247333d"
  }
}

Example3 Sample error

The group name must be unique.

Input Example

https://iai.tencentcloudapi.com/?Action=ModifyGroup
&GroupId=TencentShenZhenEmployee
&GroupExDescriptionInfos.0.GroupExDescriptionIndex=0
&GroupExDescriptionInfos.0.GroupExDescription=Department
&<Common request parameters>

Output Example

{
  "Response": {
    "Error": {
      "Code": "FailedOperation.DuplicatedGroupDescription",
      "Message": "The custom description field must be unique in the group."
    },
    "RequestId": "4b483679-3f08-4a7c-b827-4a6332dc030f"
  }
}

Example4 Sample error - 2

This example shows the error that will occur if a group name already exists.

Input Example

https://iai.tencentcloudapi.com/?Action=ModifyGroup
&GroupId=TencentShenZhenEmployee
&GroupName=Dormitory Building #1, Zhuyuan Campus, XX University
&<Common request parameters>

Output Example

{
  "Response": {
    "Error": {
      "Code": "InvalidParameterValue.GroupNameAlreadyExist",
      "Message": "The group name already exists. It must be unique."
    },
    "RequestId": "2dcce170-30cf-4078-9b3c-309362fbad21"
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.ConflictOperation The operations conflict. Do not operate on the same person simultaneously.
FailedOperation.DuplicatedGroupDescription The custom description field must be unique in the group.
FailedOperation.GroupInDeletedState The current group is being deleted. Please wait.
FailedOperation.GroupPersonMapExist The ID of the corresponding person is already in the group.
FailedOperation.GroupPersonMapNotExist The ID of the corresponding person is not in the group.
FailedOperation.ImageDecodeFailed Image decoding failed.
FailedOperation.ImageDownloadError An error occurred while downloading the image.
FailedOperation.ImageFacedetectFailed Face detection failed.
FailedOperation.ImageSizeExceed The size of the Base64-encoded image cannot exceed 5 MB.
FailedOperation.RequestTimeout The backend service timed out.
FailedOperation.SearchFacesExceed The number of faces searched for exceeds the limit.
FailedOperation.ServerError The algorithm service is exceptional. Please retry.
InternalError Internal error.
InvalidParameter.InvalidParameter Invalid parameter.
InvalidParameterValue.AccountFaceNumExceed The number of faces in the account exceeds the limit.
InvalidParameterValue.DeleteFaceNumExceed The number of faces to be deleted exceeds the limit. Every person must have at least one face image.
InvalidParameterValue.GroupExDescriptionsExceed The array length of the group's custom description fields exceeds the limit. Up to 5 fields can be created.
InvalidParameterValue.GroupExDescriptionsNameIdentical The name of the group's custom description field must be unique.
InvalidParameterValue.GroupExDescriptionsNameIllegal The name of the group's custom description field contains invalid characters. It can contain only letters, -, _, and digits.
InvalidParameterValue.GroupExDescriptionsNameTooLong The name of the group's custom description field exceeds the length limit.
InvalidParameterValue.GroupFaceNumExceed The number of faces in the group exceeds the limit.
InvalidParameterValue.GroupIdAlreadyExist The group ID already exists. It must be unique.
InvalidParameterValue.GroupIdIllegal The group ID contains invalid characters. It can contain only letters, digits, and special symbols (-%@#&_).
InvalidParameterValue.GroupIdNotExist The group ID does not exist.
InvalidParameterValue.GroupIdTooLong The group ID exceeds the length limit.
InvalidParameterValue.GroupIdsExceed The list of groups passed in exceeds the limit.
InvalidParameterValue.GroupNameAlreadyExist The group name already exists. It must be unique.
InvalidParameterValue.GroupNameIllegal The group name contains invalid characters. It can contain only letters, -, _, and digits.
InvalidParameterValue.GroupNameTooLong The group name exceeds the length limit.
InvalidParameterValue.GroupNumExceed The number of groups exceeds the limit. If you need more, please contact us.
InvalidParameterValue.GroupNumPerPersonExceed The number of groups exceeds the limit. One person can be added to up to 100 groups.
InvalidParameterValue.GroupTagIllegal The group remarks field contains invalid characters. It can contain only letters, -, _, and digits.
InvalidParameterValue.GroupTagTooLong The group remarks field exceeds the length limit.
InvalidParameterValue.ImageEmpty Empty image.
InvalidParameterValue.LimitExceed The number of returned results exceeds the limit.
InvalidParameterValue.NoFaceInGroups There are no faces in the specified group.
InvalidParameterValue.NoFaceInPhoto There are no faces in the image.
InvalidParameterValue.OffsetExceed The starting number is too large. Please check the length of the array to be requested.
InvalidParameterValue.PersonExDescriptionInfosExceed The array length of the person's custom description fields exceeds the limit. Up to 5 fields are allowed.
InvalidParameterValue.PersonExDescriptionsNameIdentical The name of the person's custom description field must be unique.
InvalidParameterValue.PersonExDescriptionsNameIllegal The name of the person's custom description field contains invalid characters. It can contain only letters, -, _, and digits.
InvalidParameterValue.PersonExDescriptionsNameTooLong The name of the person's custom description field exceeds the length limit.
InvalidParameterValue.PersonExistInGroup The ID of the corresponding person is already in the group.
InvalidParameterValue.PersonFaceNumExceed The number of face images for the person exceeds the limit. One person can have up to 5 face images.
InvalidParameterValue.PersonGenderIllegal An error occurred while setting person gender. 0: empty; 1: male; 2: female.
InvalidParameterValue.PersonIdAlreadyExist The person ID already exists. It must be unique.
InvalidParameterValue.PersonIdIllegal The person ID contains invalid characters. It can contain only letters, digits, and -%@#&_.
InvalidParameterValue.PersonIdNotExist The person ID does not exist.
InvalidParameterValue.PersonIdTooLong The person ID field exceeds the length limit.
InvalidParameterValue.PersonNameIllegal The person name contains invalid characters. It can contain only letters, -, _, and digits.
InvalidParameterValue.PersonNameTooLong The person name exceeds the length limit.
InvalidParameterValue.SearchPersonsExceed The number of persons searched for exceeds the limit.
InvalidParameterValue.UploadFaceNumExceed Up to four faces can be uploaded at a time.
InvalidParameterValue.UrlIllegal Invalid URL format.
LimitExceeded.ErrorFaceNumExceed The number of faces exceeds the limit.
MissingParameter.ErrorParameterEmpty A required parameter is empty.
ResourceUnavailable.Delivering The resource is being shipped.
ResourceUnavailable.Freeze The account is frozen.
ResourceUnavailable.InArrears The account is in arrears.
ResourceUnavailable.NotExist The billing status is unknown. Please check whether the service has been activated in the console.
ResourceUnavailable.Recover The resource has been repossessed.
ResourceUnavailable.StopUsing The service has been suspended for the account.
ResourceUnavailable.UnknownStatus The billing status is unknown.
ResourcesSoldOut.ChargeStatusException The billing status is exceptional.
UnsupportedOperation.UnknowMethod Unknown method name.