Tool Name: airdroid_business_update_group_name
Risk Level: 🟠 Medium Risk
Execution Mode: ⚡ Synchronous
Category: Group Management
Quick Start (Copy & Use)
One-liner: Rename a specified group.
You need: GroupId (group ID), GroupName (new group name)
Success criteria: StatusCode == 200 AND ErrorMessage == ""
What to do next: No further action needed, or call Get a Group to confirm the change
Minimum request example:
{
"GroupId": 12,
"GroupName": "Department 12"
}
Minimum response example:
{
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: Rename a group by ID
Scenario: Already know the group ID; rename it directly
{
"GroupId": 100,
"GroupName": "Marketing Team"
}
Recipe 2: Look up by old name then rename
Scenario: Only know the old group name; need to look up the ID first
Step 1: Get the group ID
{
"GroupName": "Old Group Name"
}
Response:
{
"GroupIds": [100],
"StatusCode": 200,
"ErrorMessage": ""
}
Step 2: Rename the group
{
"GroupId": 100,
"GroupName": "New Group Name"
}
Recipe 3: Batch rename groups
Scenario: Rename multiple groups (must call individually)
First group:
{
"GroupId": 100,
"GroupName": "Region A - Sales"
}
Second group:
{
"GroupId": 101,
"GroupName": "Region B - Sales"
}
1. Overview
1.1 Description
Rename a specified device group in AirDroid Business. Used for group renaming, naming standardization, or updating group labels during organizational restructuring.
1.2 When to Use
- Organizational restructuring: Update group names after department or team renaming
- Naming standardization: Unify group naming conventions
- Spelling correction: Fix errors in group names
- Information updates: Update group names based on business changes
1.3 Execution Mode & Response
This is a synchronous operation that returns the result immediately.
- Return value: StatusCode and ErrorMessage
- Typical latency: < 1 second
1.4 Prerequisites
| Condition | Description | How to Check |
|---|---|---|
| Group exists | The GroupId must correspond to an existing group | Use Get a Group to verify |
| Not the default group | Default group cannot be renamed | Use Get a Group to check is_default |
| No name conflict | New name must not duplicate a sibling group | Use Get a Group ID by Group Name to check |
| Sufficient permissions | Account must have permission to modify groups | - |
1.5 Prerequisite Tools
| Dependency Tool | Purpose | Necessity |
|---|---|---|
| Get a Group ID by Group Name | Get GroupId by group name | If only the group name is known |
| Get a Group | Check if group exists and whether it is the default group | Recommended |
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| GroupId | number | ✅ Yes | - | Group unique identifier |
| GroupName | string | ✅ Yes | - | New group name |
2.2 Parameter Details
`GroupId`
Unique identifier of the group to rename.
- Type: number (integer)
- Format requirements: Must be a positive integer greater than 0
- Source:
How to obtain:
- Use Get a Group ID by Group Name to look up by group name
- Use the group_id field from Get All Devices response
- Use the id field from Get a Group response
- How to fill in a GI node:
- Constant value: Enter a number directly, e.g. 100
- Upstream output reference: Get from Get a Group ID by Group Name output GroupIds[0]
- Example:
100
`GroupName`
The new name for the group.
- Type: string
- Format requirements:
- Maximum length: 35 characters
- Cannot be empty or contain only spaces
- Prohibited special characters: / \ : * < > | ? ' " =
- Source: User-specified
- How to fill in a GI node:
- Constant value: Enter a string directly, e.g. "Marketing Team"
- Upstream output reference: Get the new name from user input
- Example:
"Marketing Team"
Important: The new name must not duplicate another group under the same parent.
3. Outputs
3.1 Response Examples
Success response:
{
"StatusCode": 200,
"ErrorMessage": ""
}
Error response (group not found):
{
"StatusCode": 200,
"ErrorMessage": "Group not found"
}
Error response (parameter error):
{
"StatusCode": -1,
"ErrorMessage": "Invalid group_name."
}
Error response (name conflict):
{
"StatusCode": 200,
"ErrorMessage": "Group name already exists"
}
3.2 Field Descriptions
| Field Path | Type | Description |
|---|---|---|
| StatusCode | number | Status code. See 5.1 AB Three-Layer Error Codes |
| ErrorMessage | string | Error message. Empty string on success |
4. Examples
4.1 Basic Example: Rename a group
Request parameters:
{
"GroupId": 12,
"GroupName": "Department 12"
}
Response:
{
"StatusCode": 200,
"ErrorMessage": ""
}
4.2 Advanced Example: Look up by old name then rename
Step 1: Look up the group ID
Request:
{
"GroupName": "Sales Team"
}
Response:
{
"GroupIds": [100],
"StatusCode": 200,
"ErrorMessage": ""
}
Step 2: Rename the group
Request:
{
"GroupId": 100,
"GroupName": "Sales & Marketing Team"
}
Response:
{
"StatusCode": 200,
"ErrorMessage": ""
}
4.3 Error Example: Contains illegal characters
Request parameters:
{
"GroupId": 100,
"GroupName": "Sales/Marketing"
}
Response:
{
"StatusCode": -1,
"ErrorMessage": "Invalid group_name."
}
4.4 Error Example: Name already exists
Request parameters:
{
"GroupId": 100,
"GroupName": "Existing Group"
}
Response:
{
"StatusCode": 200,
"ErrorMessage": "Group name already exists"
}
5. Error Handling
5.1 AB Three-Layer Error Codes
Core principle: AB uses a three-layer error code strategy. The Agent should decide its handling approach based on the StatusCode.
| StatusCode | Meaning | Scenario | Agent Action |
|---|---|---|---|
| -1 | Parameter validation error | Name is empty, contains illegal characters, or GroupId is invalid | ❌ Do not retry; fix parameters and call again |
| 200 | Business success or business error | HTTP request succeeded; check ErrorMessage | Empty ErrorMessage = success; non-empty = business error |
| 500 | Network/request exception | Timeout, connection failure | ⚠️ Retry up to 2 times with 5-second intervals |
5.2 Common Errors
| StatusCode | ErrorMessage Example | Cause | Fix |
|---|---|---|---|
| -1 | Invalid group_name. | Name is empty or contains illegal characters | Check the name and remove special characters |
| -1 | Invalid group_id. | GroupId is not a positive integer | Verify GroupId is valid |
| 200 | Group not found | Group does not exist | Use Get a Group ID by Group Name to confirm the group |
| 200 | Group name already exists | A group with the same name already exists | Use a different name |
| 200 | Cannot rename default group | Attempting to rename the default group | Default group cannot be renamed |
| 200 | access_token is invalid. | Token is invalid or expired | Refresh the AccessToken |
| 500 | Request timeout after 60 seconds. | Request timed out | Retry later |
5.3 Agent Self-Healing Decision Table
| StatusCode | Auto-Retry | Retry Strategy | Requires Manual Intervention |
|---|---|---|---|
| -1 | ❌ | - | Fix parameters and call again |
| 200 (non-empty ErrorMessage) | ❌ | - | Fix based on error message |
| 500 | ⚠️ | Retry up to 2 times with 5-second intervals | Escalate if failures persist |
6. Best Practices
6.1 Performance Optimization
- Pre-check: Verify the new name is available before renaming to avoid invalid calls
- Batch scenario: For renaming multiple groups, call in parallel
6.2 Security Considerations
🟡 Write operation: This operation modifies group data.
- Confirm target: Verify the GroupId corresponds to the correct group before renaming
- Naming standards: Follow organizational naming conventions
- Notify stakeholders: Name changes may affect other workflows using this group
6.3 Idempotency
Idempotency of this operation: Naturally idempotent.
- Setting the same group name multiple times has no side effects
- If the new name is the same as the current name, it returns success immediately
7. Related Tools
7.1 Prerequisite Tools
| Tool Name | Purpose |
|---|---|
| Get a Group ID by Group Name | Get GroupId by group name |
| Get a Group | Check if the group exists and its current name |
7.2 Follow-up Tools
| Tool Name | Purpose |
|---|---|
| Get a Group | Confirm the name change |
7.3 Similar Tools Comparison
| Tool Name | Use Case | Difference |
|---|---|---|
| Update a Group Name | Modify group name | Modifies the name |
| Update a Group Remark | Modify group remark | Modifies the remark/description |
8. Tool Chains
8.1 Look Up by Name and Rename
Scenario: User provides the old name and new name; perform the rename
Tool chain:
Get a Group ID by Group Name → Update a Group Name
Steps:
- Call Get a Group ID by Group Name to get the group ID
- Verify the group exists (GroupIds is not empty)
- Use the GroupId to call Update a Group Name
8.2 Safe Rename (Pre-check)
Scenario: Ensure the new name is available before renaming
Tool chain:
Get a Group ID by Group Name (new name) → [Check] → Update a Group Name
Steps:
- Call Get a Group ID by Group Name to check if the new name is already in use
- If GroupIds is empty, the name is available
- Call Update a Group Name to perform the rename
8.3 Rename and Update Remark
Scenario: Update both the group name and remark simultaneously
Tool chain:
Update a Group Name → Update a Group Remark
Steps:
- Call Update a Group Name to change the name
- Call Update a Group Remark to update the remark
Leave a Reply.