Tool Name: airdroid_business_file_batch_send_result_search
Risk Level: Low Risk
Execution Mode: Synchronous
Category: File Management
Quick Start
In one sentence: Read one page of per-device delivery results for an existing batch-send task.
What you need: TaskId returned by Batch Send Files. It must be an 8-4-4-4-12 hexadecimal UUID with hyphens.
Success criteria: ErrorMessage is empty. Also inspect each Devices[].status; an accepted send task is not proof that every device received the file.
What to do next: If Pagination.page_index < Pagination.last_page, request the next page with a larger PageIndex; otherwise inspect device rows that are not Success.
Minimal request example:
{
"TaskId": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2"
}
Minimal response example:
{
"Task": {
"task_id": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2",
"file_name": "warehouse-safety-guide.pdf",
"file_size": 2843912,
"created_at": "2026-07-20 09:05:14",
"summary": {
"succeeded": 2,
"failed": 0,
"distributing": 0
}
},
"Devices": [
{
"device_id": "a8f3d91c72b44e5fa103c892d0b74561",
"device_name": "Chicago Warehouse Tablet 01",
"status": "Success",
"error_code": 0,
"pushed_at": "2026-07-20 09:05:21",
"responded_at": "2026-07-20 09:06:03"
}
],
"Pagination": {
"total": 2,
"page_size": 100,
"page_index": 1,
"last_page": 1
},
"Hint": "",
"Retryable": false,
"OriginalStatusCode": 200,
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes
Recipe 1: Read the First Result Page
When to use: Batch Send Files returned an accepted TaskId and you need the current per-device delivery rows.
{
"TaskId": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2",
"PageIndex": 1,
"PageSize": 100,
"Filter": {}
}
Recipe 2: Request the Next Page
When to use: A prior successful response reports Pagination.page_index lower than Pagination.last_page.
{
"TaskId": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2",
"PageIndex": 2,
"PageSize": 100,
"Filter": {}
}
Use the same task and filter with the next 1-based page number. A PageIndex greater than the returned last_page is rejected with StatusCode -1; the tool does not clamp it.
Recipe 3: Inspect Devices Still Sending
When to use: You want the rows whose delivery status is exactly Sending.
{
"TaskId": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2",
"PageIndex": 1,
"PageSize": 100,
"Filter": {
"status": "Sending"
}
}
1. Overview
1.1 Description
This read-only tool returns a paginated snapshot of per-device delivery results for one batch-send task. It does not create or run a batch send.
1.2 When to Use
- Check the current delivery results for a batch-send task.
- Find devices in a supported delivery status, such as Sending or Insufficient storage available.
- Read additional result pages for the same task.
Do not use this tool to start a send or to query another task type.
1.3 Execution Mode and Response
This is a synchronous read. It returns the current Task, one page of Devices, and Pagination immediately. It does not automatically retrieve every page.
1.4 Prerequisites
| Condition | Description |
|---|---|
| Credential | The AirDroid Business credential must be available and authorized for the query. |
| Matching task | TaskId must come from the accepted response of Batch Send Files in the same organization. |
1.5 Prerequisite Tool
| Tool | Purpose | Required |
|---|---|---|
| Batch Send Files | Creates the batch-send task and returns TaskId. | Yes |
1.6 Scope
Use this tool only with the TaskId from a batch-send task.
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| TaskId | string | Yes | "" | UUID returned by Batch Send Files. |
| PageIndex | number | No | 1 | 1-based result-page index. |
| PageSize | number | No | 100 | Number of rows per page, from 1 through 200. |
| Filter | object | No | Not defined | Optional structured result filter. The runtime also accepts a JSON-encoded object string. |
2.2 Parameter Details
`TaskId`
Use the TaskId field returned by Batch Send Files after task acceptance.
- Type: string
- Format: UUID with 8-4-4-4-12 hexadecimal groups separated by hyphens
- Invalid format: returns StatusCode -1
- No matching send task: returns a non-empty ErrorMessage; it can still have StatusCode 200
`PageIndex`
PageIndex is 1-based and defaults to 1. It must be a whole number greater than or equal to 1. Zero, negative, decimal, and non-integer values return StatusCode -1.
`PageSize`
PageSize defaults to 100 and must be a whole number from 1 through 200. Values outside that range, decimal values, and invalid values return StatusCode -1; they are not silently replaced by the default.
`Filter`
The DSL type is object. The runtime accepts either an object or a string containing a JSON object. Omit it, use {}, or use an empty string for no filter; results remain paginated. Its fields narrow the request only and are not added to Devices[].
For a string value, malformed JSON returns StatusCode -1, ErrorMessage Filter must be a JSON object., and Retryable false. A JSON-encoded value that decodes to a non-object (such as []) is treated as no filter, not as a validation error. A raw value that is neither a string nor an object returns the same Filter must be a JSON object. validation error. An object that cannot be JSON-serialized returns Filter is not JSON-serializable. with StatusCode -1.
Supported fields are status, device_id, device_name, group_id, and group_name.
- Use eq for one exact value.
- Use in for status or ID lists.
- Use like for a case-insensitive name substring on device_name or group_name.
- status must exactly match a device row status, not a console summary label such as Succeeded or Distributing.
- All removes status filtering.
Supported status values:
| Value |
|---|
| Success |
| Sending |
| Download notification received but not downloaded |
| Failed to download. Please check the device's network condition |
| Insufficient storage available |
| Failed to connect device |
| Command received, downloads will start when the requirement met |
| Storage permission has not been granted to Biz Daemon |
| File expired, failed to download |
Examples:
{
"device_name": {
"like": "Kiosk"
},
"group_name": {
"eq": "Warehouse"
}
}
2.3 Parameter Combination Logic
TaskId is required. PageIndex, PageSize, and Filter are optional. Filtered results are still paginated. When a successful response has more pages, increment PageIndex while keeping the same task and intended filter.
3. Outputs
3.1 Response Examples
The Quick Start response is a successful query response.
Validation error response:
{
"Task": {},
"Devices": [],
"Pagination": {},
"OriginalStatusCode": 0,
"StatusCode": -1,
"ErrorMessage": "TaskId format is invalid.",
"Hint": "Use the UUID TaskId returned by 'Batch Send Files' (8-4-4-4-12 hex with hyphens).",
"Retryable": false
}
3.2 Field Descriptions
| Field | Type | Description |
|---|---|---|
| Task | object | Batch-send task summary. |
| Task.task_id | string | Batch-send task identifier. |
| Task.file_name | string | File name. |
| Task.file_size | number | File size in bytes. |
| Task.created_at | string | Creation time in YYYY-MM-DD HH:mm:ss form; the API does not separately label a timezone. |
| Task.summary.succeeded | number | Succeeded device count. |
| Task.summary.failed | number | Failed device count. |
| Task.summary.distributing | number | Distributing device count. |
| Devices | object-array | Result rows for the requested page. |
| Devices[].device_id | string | Unique identifier of the device. |
| Devices[].device_name | string | Device name. |
| Devices[].status | string | One of the send-result statuses listed below. |
| Devices[].error_code | number | Per-device error code. It is 0 for a successful device result. |
| Devices[].pushed_at | string | Push time in YYYY-MM-DD HH:mm:ss form, or an empty string when unavailable. |
| Devices[].responded_at | string | Device response time in YYYY-MM-DD HH:mm:ss form, or an empty string when unavailable. |
| Pagination | object | Pagination metadata. |
| Hint | string | Recommended next action after a failure; empty on success. |
| Retryable | bool | Whether the same request may be retried after a failure. |
| OriginalStatusCode | number | Upstream HTTP status; 0 means no response was received. |
| StatusCode | number | Tool result status; always check ErrorMessage as well. |
| ErrorMessage | string | Empty when the query succeeds; non-empty on failure. |
Devices[] does not include group_id or group_name.
3.3 Status Values
Devices[].status uses the exact values listed for Filter.status in Filter. Do not substitute summary labels such as Succeeded or Distributing.
3.4 Pagination
| Field | Description |
|---|---|
| Pagination.total | Total matching rows. |
| Pagination.page_size | Page size returned by the service. |
| Pagination.page_index | Current 1-based page index. |
| Pagination.last_page | Last available 1-based page index. |
Request the next page only when page_index < last_page. PageIndex greater than last_page returns StatusCode -1 with Task, Devices, and Pagination cleared.
4. Examples
4.1 Basic Example: Successful Deliveries
{
"TaskId": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2",
"PageIndex": 1,
"PageSize": 100,
"Filter": {
"status": "Success"
}
}
An empty ErrorMessage means the query completed. The Success filter does not prove that unreturned pages or nonmatching devices also succeeded.
4.2 Advanced Example: Filter by Group Name
{
"TaskId": "8f0f14f3-1c85-4b3c-98f0-5b2519e7caa2",
"PageIndex": 1,
"PageSize": 100,
"Filter": {
"group_name": {
"eq": "Warehouse"
}
}
}
group_name narrows the device list server-side but is not returned in Devices[].
4.3 Error Example: Wrong Task Type or Unknown Task
Use only the UUID returned by Batch Send Files. A UUID that does not identify a matching send task returns empty Task, Devices, and Pagination, with a non-empty ErrorMessage and a Hint. This business failure can have StatusCode 200, so do not treat StatusCode alone as success.
5. Error Handling
5.1 StatusCode Semantics
| StatusCode | Meaning | Agent action |
|---|---|---|
| -1 | Input validation failed. | Correct the request; do not retry it unchanged. |
| 200 with empty ErrorMessage | The query succeeded. | Inspect the current page and its pagination. |
| 200 with non-empty ErrorMessage | A business failure, including a task that does not exist. | Follow Hint; correct the task or access condition before retrying. |
| 500 | Upstream HTTP, timeout, network, or unexpected tool failure. | Use Retryable and Hint to decide whether to retry. |
5.2 Caller-Visible Errors
| StatusCode and ErrorMessage | Cause | Caller-visible recovery |
|---|---|---|
| -1; access_token is required. | The credential is missing or blank. | Hint is Re-authorize the AirDroid Business credential.; Retryable is false and OriginalStatusCode remains 0. |
| -1; TaskId is required. | No task ID was supplied. | Provide the TaskId from Batch Send Files. |
| -1; TaskId must be a string. | The task ID is not text. | Provide the UUID as a string. |
| -1; TaskId format is invalid. | The value is not a UUID in the required format. | Use the returned Batch Send Files UUID. |
| -1; PageIndex is invalid. | The page index is not a whole positive number. | Use a 1-based whole number. |
| -1; PageSize is invalid. | The page size is not a whole number in range. | Use a whole number from 1 through 200. |
| -1; PageSize <value> exceeds the maximum (200). | PageSize is a whole number above the maximum. | Use a value from 1 through 200; Retryable is false. |
| -1; Filter must be a JSON object. | Filter is malformed JSON or is a raw value other than a string or object. | Provide an object or a JSON-encoded object string such as {"status":"Success"}; Retryable is false. |
| -1; Filter is not JSON-serializable. | An object filter has non-JSON-compatible keys or values. | Use string keys and JSON-compatible values; Retryable is false. |
| -1; PageIndex <value> exceeds last_page (<value>). | The requested page is past the returned last page. | Use a page from 1 through Pagination.last_page; Task, Devices, and Pagination are cleared. |
| 200; The specified task does not exist. or a service-provided task-not-found message | The task is missing or is not a matching batch-send task. | Read Hint, use the returned TaskId from Batch Send Files, and do not retry unchanged; Retryable is false. |
| 200; You do not have permission to perform this action. or a service-provided permission message | The credential lacks required permission or resource scope. | Read Hint, request the required permission or scope, then retry; Retryable is false. |
| 200; The file batch service could not complete this query. or another service-provided business error message | The service returned a business failure. | Read Hint; retry only when its Retryable field permits it. |
| 500; Upstream HTTP <status>. | The upstream service returned a non-200 HTTP response. | Read Hint. Retryable is true only for HTTP 429, 500, 502, 503, or 504; it is false for other statuses. OriginalStatusCode is the upstream status. |
| 500; Request timed out after 60 seconds. | The request timed out. | Hint requests a retry and connectivity check; Retryable is true and OriginalStatusCode is 0. |
| 500; Network request failed before a usable response was received. | The network request failed before a usable response. | Hint requests a retry and connectivity check; Retryable is true and OriginalStatusCode is 0. |
| 500; Unexpected tool error. | An unexpected tool failure occurred, including an unusable success-body shape. | Follow Hint; Retryable is false. |
5.3 Retry Decision
This read-only query is idempotent. Do not infer retry eligibility from StatusCode alone: use the returned Retryable and Hint. A wrong TaskId or a task-not-found result is not retryable.
6. Best Practices
6.1 Preserve the Accepted TaskId
Store the TaskId from the Batch Send Files acceptance response and use it unchanged as text. Task creation is not proof of delivery.
6.2 Keep Responses Focused
Use Filter and a suitable PageSize within 1 through 200 to retrieve only the result rows needed for inspection. The tool always returns one page.
6.3 Interpret Results Per Device
Treat Task.summary as counts and Devices[].status as the per-device result. Inspect the complete intended page set before concluding a batch-wide outcome.
7. Related Tools
| Tool | Purpose |
|---|---|
| Batch Send Files | Creates the batch-send task and returns the required TaskId. |
No additional related-tool chain is defined for this query.
8. Tool Chains
8.1 Submit and Inspect Delivery Results
Batch Send Files -> Search File Batch Send Results
Pass Batch Send Files.TaskId to this tool, then inspect the paginated Devices[] delivery rows.
Leave a Reply.