Tool Name: airdroid_business_get_group
Risk Level: 🟢 Low Risk
Execution Mode: ⚡ Synchronous
Category: Group Management
Quick Start (Copy & Use)
One-liner: Retrieve detailed group information by GroupId, including name, remark, sub-groups list, and more.
You need: GroupId (group unique identifier)
Success criteria: StatusCode == 200 AND ErrorMessage == "" AND Group object is not empty
What to do next: Use the group info for device assignment, group management, or displaying the group hierarchy
Minimum request example:
{
"GroupId": 123
}
Minimum response example:
{
"Group": {
"id": "123",
"name": "Sales Team",
"owner_id": "10001",
"create_date": "2024-06-15 10:30:00",
"update_date": "2024-12-01 14:20:00",
"is_default": "0",
"deploy_code": "ABC123XYZ",
"pid": "0",
"remark": "Sales department devices",
"device_count": 25,
"sub_groups": []
},
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: Get top-level group information
Scenario: Query basic information and device count of a top-level group
{
"GroupId": 123
}
Recipe 2: Get group information including sub-groups
Scenario: Query parent group info along with all its sub-groups
{
"GroupId": 100
}
Expected response (with sub-groups):
{
"Group": {
"id": "100",
"name": "Sales Department",
"pid": "0",
"device_count": 50,
"sub_groups": [
{
"id": "101",
"name": "North Sales",
"pid": "100",
"remark": "Northern region"
},
{
"id": "102",
"name": "South Sales",
"pid": "100",
"remark": "Southern region"
}
]
},
"StatusCode": 200,
"ErrorMessage": ""
}
Recipe 3: Look up GroupId first, then get group details
Scenario: Only know the group name; need to get GroupId first and then query group details
Step 1: Call Get a Group ID by Group Name
{
"GroupName": "Sales Team"
}
Step 2: Use the returned GroupId to call this tool
{
"GroupId": 123
}
1. Overview
1.1 Description
Retrieve detailed information of a device group in AirDroid Business by its unique identifier (GroupId), including the group name, remark, creation time, device count, and sub-groups list.
1.2 When to Use
- View group details: Need the full information of a group, including device count and remark
- Get group hierarchy: Need to retrieve a parent group and all its sub-groups
- Verify group existence: Confirm whether a GroupId corresponds to an existing group
- Get deploy code: Retrieve the group's deploy_code for device enrollment
1.3 Execution Mode & Response
This is a synchronous operation that returns group information immediately.
- Return value: Group object (full group information)
- Typical latency: < 1 second
1.4 Prerequisites
| Condition | Description | How to Check |
|---|---|---|
| Group exists | GroupId must correspond to an existing group | Use Get a Group ID by Group Name to verify |
| Sufficient permissions | Account must have permission to view 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 All Devices | Get group_id field from device info | Alternative method |
1.6 Comparison with Similar Tools
| Tool Name | Use Case | Difference |
|---|---|---|
| Get a Group | Query detailed info of a single group | Returns full group info including sub-groups list |
| Get a Group ID by Group Name | Look up group ID by name | Returns only GroupId; no group details |
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| GroupId | number | ✅ Yes | - | Group unique identifier |
2.2 Parameter Details
`GroupId`
Unique identifier of the group, used to precisely locate the group to query.
- 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 GroupId returned by Create a Group
- How to fill in a GI node:
- Constant value: Enter a number directly, e.g. 123
- Upstream output reference: Get from Get a Group ID by Group Name output GroupIds[0]
- Example:
123
3. Outputs
3.1 Response Examples
Success response:
{
"Group": {
"id": "123",
"name": "Sales Team",
"owner_id": "10001",
"create_date": "2024-06-15 10:30:00",
"update_date": "2024-12-01 14:20:00",
"is_default": "0",
"deploy_code": "ABC123XYZ",
"pid": "0",
"remark": "Sales department devices",
"device_count": 25,
"sub_groups": [
{
"id": "124",
"name": "North Sales",
"owner_id": "10001",
"deploy_code": "DEF456ABC",
"is_default": "0",
"pid": "123",
"remark": "Northern region sales team"
},
{
"id": "125",
"name": "South Sales",
"owner_id": "10001",
"deploy_code": "GHI789DEF",
"is_default": "0",
"pid": "123",
"remark": "Southern region sales team"
}
]
},
"StatusCode": 200,
"ErrorMessage": ""
}
Error response (group not found):
{
"Group": {},
"StatusCode": 200,
"ErrorMessage": "Group not found"
}
Error response (parameter error):
{
"Group": {},
"StatusCode": -1,
"ErrorMessage": "Invalid group_id."
}
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 |
| Group | object | Group information object |
| Group.id | string | Group unique identifier |
| Group.name | string | Group name |
| Group.owner_id | string | Enterprise owner account ID |
| Group.create_date | string | Group creation time, format: YYYY-MM-DD HH:MM:SS |
| Group.update_date | string | Group last updated time, format: YYYY-MM-DD HH:MM:SS |
| Group.is_default | string | Whether this is the default group. "0" = No, "1" = Yes |
| Group.deploy_code | string | Group deploy code, used during device enrollment to assign the device to this group |
| Group.pid | string | Parent group ID. "0" means top-level group |
| Group.remark | string | Group remark/description |
| Group.device_count | number | Number of devices in the group |
| Group.sub_groups | array | Sub-groups array. Empty array if no sub-groups |
3.3 Status Code / Enum Value Mappings
| Field | Value | Meaning |
|---|---|---|
| is_default | "0" | Not the default group |
| is_default | "1" | Default group (each enterprise has exactly one) |
| pid | "0" | Top-level group (no parent group) |
| pid | Other numeric string | Parent group's ID |
4. Examples
4.1 Basic Example: Get single group information
Request parameters:
{
"GroupId": 123
}
Response:
{
"Group": {
"id": "123",
"name": "Sales Team",
"owner_id": "10001",
"create_date": "2024-06-15 10:30:00",
"update_date": "2024-12-01 14:20:00",
"is_default": "0",
"deploy_code": "ABC123XYZ",
"pid": "0",
"remark": "Sales department devices",
"device_count": 25,
"sub_groups": []
},
"StatusCode": 200,
"ErrorMessage": ""
}
4.2 Advanced Example: Get group hierarchy with sub-groups
Request parameters:
{
"GroupId": 100
}
Response:
{
"Group": {
"id": "100",
"name": "Regional Teams",
"owner_id": "10001",
"create_date": "2024-01-10 09:00:00",
"update_date": "2024-12-15 16:45:00",
"is_default": "0",
"deploy_code": "REG100ABC",
"pid": "0",
"remark": "All regional sales teams",
"device_count": 150,
"sub_groups": [
{
"id": "101",
"name": "North Region",
"owner_id": "10001",
"deploy_code": "NOR101DEF",
"is_default": "0",
"pid": "100",
"remark": "Northern region devices"
},
{
"id": "102",
"name": "South Region",
"owner_id": "10001",
"deploy_code": "SOU102GHI",
"is_default": "0",
"pid": "100",
"remark": "Southern region devices"
}
]
},
"StatusCode": 200,
"ErrorMessage": ""
}
4.3 Error Example: Group not found
Request parameters:
{
"GroupId": 99999
}
Response:
{
"Group": {},
"StatusCode": 200,
"ErrorMessage": "Group not found"
}
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 | GroupId is invalid (not a positive integer) | ❌ 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_id. | GroupId is not a positive integer | Ensure GroupId is a positive integer greater than 0 |
| 200 | Group not found | Group does not exist | Use Get a Group ID by Group Name to confirm the group exists |
| 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
- Cache group info: Group information changes infrequently; cache results to reduce redundant queries
- Batch query scenario: When querying multiple groups, consider iterating or using other tools to get device lists
6.2 Security Considerations
🟢 Read operation: No special security concerns; this operation does not modify any data.
7. Related Tools
7.1 Prerequisite Tools
| Tool Name | Purpose |
|---|---|
| Get a Group ID by Group Name | Get GroupId by group name |
| Get All Devices | Get group_id field from device info |
7.2 Follow-up Tools
| Tool Name | Purpose |
|---|---|
| Update a Group Name | Modify the group name |
| Update a Group Remark | Modify the group remark |
| Delete Groups | Delete empty groups |
| Move Devices to a Group | Move devices into this group |
7.3 Similar Tools Comparison
| Tool Name | Use Case | Difference |
|---|---|---|
| Get a Group | Query full info of a single group | Returns detailed info including sub-groups |
| Get a Group ID by Group Name | Look up ID by name | Returns only a GroupId array |
8. Tool Chains
8.1 Look Up Group Details by Name
Scenario: User provides a group name; need to retrieve full group information
Tool chain:
Get a Group ID by Group Name → Get a Group
Steps:
- Call Get a Group ID by Group Name with the group name
- Take the first value from the returned GroupIds array
- Use that GroupId to call Get a Group for full information
8.2 Get Details After Creating a Group
Scenario: After creating a new group, retrieve full group info (including deploy code)
Tool chain:
Create a Group → Get a Group
Steps:
- Call Create a Group to create the new group
- Use the returned GroupId to call Get a Group
- Retrieve full info including deploy_code for device enrollment
8.3 View Group Hierarchy Structure
Scenario: Need to understand a group and all its sub-groups
Tool chain:
Get a Group (parent group) → [Optional] Get a Group (each sub-group)
Steps:
- Call Get a Group to retrieve the parent group info
- Get all sub-group basic info from the sub_groups array
- If detailed sub-group info is needed, iterate and call Get a Group for each
Leave a Reply.