Tool Name: airdroid_business_group_list
Risk Level: π’ Low Risk
Execution Mode: β‘ Synchronous
Category: Group Management
Quick Start (Copy & Use)
Summary: Retrieve a paginated list of device groups in the account (no filter). Returns normalized group fields including hierarchy path and paging metadata.
Prerequisites: A valid OAuth2 AccessToken configured in the GI node Credential.
Success Criteria: StatusCode == 200 and ErrorMessage == "".
What to Do Next: Use Groups[].id as GroupId, or pass names into Batch Resolve Group IDs by Name / Resolve Group ID by Name when you already know names.
Minimal Request Example (recommended to copy directly):
{
"PageIndex": 1,
"PageSize": 50
}
Minimal Response Example:
{
"Groups": [
{
"id": 123,
"name": "Sales",
"parent_group_id": 0,
"remark": "",
"deploy_code": "ABC123",
"create_date": "2024-01-15 10:30:00",
"is_default": "No",
"is_leaf": "Yes",
"level": 1,
"max_child_depth": 0,
"path": ["Sales"]
}
],
"Pagination": {
"total": 1,
"page_size": 50,
"page_index": 1,
"last_page": 1
},
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: First page with default page size
When to use: Browse groups starting from the first page.
{
"PageIndex": 1,
"PageSize": 50
}
Recipe 2: Smaller pages for hierarchy review
When to use: Walk the account group list with smaller pages.
{
"PageIndex": 1,
"PageSize": 20
}
Recipe 3: Paginate until the last page
When to use: Collect all groups by advancing PageIndex while page_index < last_page.
{
"PageIndex": 2,
"PageSize": 50
}
Paging rule: After each success response, if Pagination.page_index < Pagination.last_page, call again with PageIndex = Pagination.page_index + 1 (same PageSize).
1. Overview
1.1 What it does
Lists device groups for the current credential with pagination. Unlike Search Groups, this tool has no Filter β it returns the account group list page by page.
1.2 When to use
- Listing groups for selection or management UIs
- Building a hierarchy overview before creating sub-groups
- Paginating through all groups in the account
1.3 Execution mode
This is a synchronous read. The call returns Groups and Pagination immediately.
1.4 Prerequisites
| Condition | Notes |
|---|---|
| Valid credential | OAuth2 access token on the GI node |
| Permission to read groups | Upstream may return business errors if the credential lacks access |
1.5 Related tools
| Tool | Why |
|---|---|
| Resolve Group ID by Name | Exact single-name β GroupId |
| Search Groups | Filtered / operator-based group queries |
| Create a Group | Create groups after browsing parents |
| List Devices / Search Devices | Device queries scoped by group |
1.6 vs similar tools
| Need | Prefer |
|---|---|
| All groups, no filter | List Groups |
| Filter by name / parent / date / $or | Search Groups |
| One exact name β id | Resolve Group ID by Name or Batch Resolve Group IDs by Name |
2. Inputs
2.1 Parameter table
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| PageIndex | number | No | 1 | 1-based page index |
| PageSize | number | No | 50 | Records per page; accepts 1β100 |
The GI node sends PageSize = 50 by default. Set it explicitly when response size matters; accepted values are 1β100.
2.2 Details
`PageIndex`
- Must be an integer >= 1
- Invalid values β StatusCode = -1 with Hint to set a positive integer starting from 1
`PageSize`
- Must be an integer between 1 and 100
- Invalid values β StatusCode = -1
3. Outputs
3.1 Output table
| Name | Type | Description |
|---|---|---|
| Groups | array | Group objects for the current page |
| Pagination | object | total, page_size, page_index, last_page |
| Hint | string | Empty on success; next-action guidance on error |
| Retryable | boolean | Whether retrying the same params may help |
| OriginalStatusCode | number | Upstream HTTP status; 0 if none captured |
| StatusCode | number | 200 / -1 / 500 |
| ErrorMessage | string | Empty = success |
3.2 `Groups[]` common fields
Items commonly include:
| Field | Notes |
|---|---|
| id | Group ID |
| name | Group name |
| deploy_code | Deploy code |
| create_date | Creation time |
| is_default | Default-group flag (string form from API) |
| remark | Remark |
| level | Hierarchy level |
| is_leaf | Whether leaf |
| max_child_depth | Max child depth |
| path | Array of name segments from root to this group |
| parent_group_id | Parent group id |
Exact enum string sets for flags are defined by the upstream group API response shape; do not invent values beyond what you observe in responses.
3.3 Pagination
When Pagination.page_index < Pagination.last_page, request the next page with PageIndex = page_index + 1.
4. Error handling
| StatusCode | Meaning | Retry? |
|---|---|---|
| 200 | Upstream HTTP completed and body parsed; success only if ErrorMessage == "" | β |
| -1 | Local validation (bad PageIndex / PageSize / empty token) | No (fix params) |
| 500 | HTTP/network/timeout/rate-limit / unexpected | Sometimes (Retryable) |
Examples from runtime:
- Invalid PageIndex β -1, Hint: set integer starting from 1
- Invalid PageSize β -1, Hint: set 1β100
- HTTP 429 β 500, Retryable true
- Timeout (60s) β 500, Retryable true
Business failures (code != 1 from upstream) keep StatusCode = 200 with non-empty ErrorMessage (check ErrorMessage, not only StatusCode).
5. Limits & gotchas
- No filter support β use Search Groups for conditions
- PageSize max 100
- Results are scoped to the current credentialβs visible groups
6. Best practices
- Set PageSize explicitly to avoid default-text conflicts (50 vs 20)
- Prefer Search Groups when you already know name / parent / date criteria
- Use path to disambiguate same-named groups under different parents
7. Related Tools
7.1 Follow-up
| Tool | Purpose |
|---|---|
| Get a Group | Details for one GroupId |
| Search Groups | Filtered listing |
| Batch Resolve Group IDs by Name | Exact names β ids |
7.2 Comparison
| Tool | Filter | Best for |
|---|---|---|
| List Groups | None | Full paginated inventory |
| Search Groups | Yes | Targeted queries |
8. Tool Chains
8.1 List then resolve / act
List Groups β (pick names or ids) β Move Devices to a Group / Update a Group Name / β¦
8.2 Prefer Search when filtering
Search Groups (Filter) β use Groups[].id
Appendix Reference:
- Field Reference: ./Field Reference.md
- Error Code Quick Reference: ./Error Codes.md
Leave a Reply.