Tool Name: airdroid_business_get_device_info_push
Risk Level: 🟢 Low Risk
Execution Mode: ⏳ Asynchronous
Category: Device Management
Quick Start (Copy & Use)
Summary: Push a command to devices requesting them to report the latest device information.
Prerequisites: DeviceIds (array of device IDs).
Success Criteria: StatusCode == 200 and ErrorMessage is empty string.
What to Do Next: Wait 2-5 seconds, then call Get All Devices to retrieve the updated device information.
Minimal Request Example:
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"]
}
Minimal Response Example:
{
"Data": {
"limit": false
},
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: Refresh Single Device Status
When to use: Get the latest information for a single device.
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"]
}
Recipe 2: Batch Refresh Multiple Devices
When to use: Refresh information for multiple devices simultaneously.
{
"DeviceIds": [
"fa6edcff65ab444e8b5e0eb08df4175d",
"a286bea023eb4bfc8ef04770ee7dbb5e",
"b3c7def134cd556f9c6f1fc19ef5286f"
]
}
Recipe 3: Refresh Device Info and Get Screenshot
When to use: You need to capture the device's current screen.
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"],
"IsGetScreenshot": 1
}
Recipe 4: Refresh Device Info and Take Photo (Front Camera)
When to use: You need to take a photo using the front camera.
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"],
"UpdateCamera": 3
}
1. Overview
1.1 Description
Push a command to specified devices requesting them to report the latest status information. This is an asynchronous operation — after pushing the command, you need to wait a few seconds for the device to update its status data.
1.2 When to Use
- Need to get the device's real-time battery, network status, and other information
- Before performing remote operations, need to confirm the device's current status
- Need to capture the device's screen screenshot
- Need to take photos using the device's camera
1.3 Execution Mode and Response
This operation is asynchronous — after the command is pushed, the device needs a few seconds to respond and report data.
- Return value: Data object (contains rate limit information)
- Tracking method: Wait 2-5 seconds, then use Get All Devices to get updated device info
- Prerequisite: Device must be online to receive the command
- Typical duration: 2-5 seconds (device reports data after receiving the command)
1.4 Prerequisites
| Condition | Description | How to Check |
|---|---|---|
| Device online | Device must be online to receive push commands | Use Get All Devices with {"online":"Online"} filter |
| Not rate limited | Must wait for the cooling period to end | Check the returned Data.limit field |
1.5 Prerequisite Tools
| Dependency Tool | Purpose | Necessity |
|---|---|---|
| Get All Devices | Get DeviceId and confirm device is online | Required |
| Get a Device by Name | Get DeviceId by device name | If you only know the device name |
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| DeviceIds | string-array | Yes | - | Array of device IDs |
| IsGetScreenshot | number | No | 0 | Whether to get screenshot: 0=no, 1=yes |
| UpdateCamera | number | No | 0 | Camera mode: 0=none, 1=default, 2=rear, 3=front |
2.2 Parameter Details
`DeviceIds`
Array of device IDs.
- Type: string-array
- Format: JSON array containing one or more device ID strings
- Source:
How to obtain:
- Via Get All Devices tool - use the device_id field from the response
- Via Get a Device by Name tool - exact name query
The device_id field from the output can be used directly as an array element.
- Example:
["fa6edcff65ab444e8b5e0eb08df4175d", "a286bea023eb4bfc8ef04770ee7dbb5e"]
`IsGetScreenshot`
Whether to capture a device screenshot.
- Type: number
- Available values:
- 0 = Do not get screenshot (default)
- 1 = Get screenshot
- Note: The screenshot will be available after device info is updated
- Example:
1
`UpdateCamera`
Camera capture mode.
- Type: number
- Available values:
- 0 = Do not capture (default)
- 1 = Use default camera
- 2 = Use rear camera
- 3 = Use front camera
- Example:
3
2.3 Parameter Combination Logic
- DeviceIds is required
- IsGetScreenshot and UpdateCamera can be used independently or together
- If neither screenshot nor photo is needed, only pass DeviceIds
3. Outputs
3.1 Response Example
Success response:
{
"Data": {
"limit": false
},
"StatusCode": 200,
"ErrorMessage": ""
}
Rate limited response:
{
"Data": {
"limit": true
},
"StatusCode": 200,
"ErrorMessage": ""
}
Error response:
{
"Data": {},
"StatusCode": -1,
"ErrorMessage": "device_ids must be a list of strings."
}
3.2 Field Descriptions
| Field Path | Type | Description |
|---|---|---|
| StatusCode | number | Status code. 200=success, -1=parameter error, 500=network exception |
| ErrorMessage | string | Error message. Empty string on success |
| Data | object | Response data object |
| Data.limit | boolean | Whether rate limit is triggered. true=rate limited, need to wait for cooling period |
3.3 Rate Limit Information
| Plan Type | Cooling Period |
|---|---|
| Basic Plan | 30 minutes |
| Standard Plan | 1 minute |
| Enterprise Plan | 1 minute |
When Data.limit = true, it means requests are too frequent. Wait for the cooling period to end before retrying.
4. Examples
4.1 Basic Example: Refresh Single Device Status
Request Parameters:
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"]
}
Response:
{
"Data": {
"limit": false
},
"StatusCode": 200,
"ErrorMessage": ""
}
4.2 Advanced Example: Refresh and Get Screenshot
Request Parameters:
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"],
"IsGetScreenshot": 1,
"UpdateCamera": 3
}
Response:
{
"Data": {
"limit": false
},
"StatusCode": 200,
"ErrorMessage": ""
}
4.3 Error Example: Rate Limit Triggered
Request Parameters:
{
"DeviceIds": ["fa6edcff65ab444e8b5e0eb08df4175d"]
}
Response:
{
"Data": {
"limit": true
},
"StatusCode": 200,
"ErrorMessage": ""
}
Handling: Wait for the cooling period before retrying (Basic Plan: 30 minutes, Standard/Enterprise Plan: 1 minute).
5. Error Handling
5.1 AB Three-Layer Error Codes
| StatusCode | Meaning | Use Case | Agent Response |
|---|---|---|---|
| -1 | Parameter validation error | Local validation failure (missing required params, format errors) | Do not retry, fix parameters and retry |
| 200 | Business success or business error | HTTP request succeeded, check ErrorMessage | Empty ErrorMessage = success; check Data.limit for rate limiting |
| 500 | Network/request exception | Timeout, connection failure, DNS resolution failure | May retry (max 2 times, 5-second interval) |
5.2 Common Errors
| StatusCode | ErrorMessage / Data.limit | Cause | Fix |
|---|---|---|---|
| -1 | device_ids must be a list of strings. | DeviceIds format is incorrect | Ensure string array format is passed |
| -1 | access_token is invalid. | Token invalid or expired | Refresh access token |
| 200 | Data.limit = true | Requests too frequent | Wait for cooling period before retrying |
| 500 | Request timeout after 60 seconds. | Request timeout | Retry later |
5.3 Agent Self-Healing Decision Table
| Condition | Auto Retry | Retry Strategy | Manual Intervention Needed |
|---|---|---|---|
| StatusCode = -1 | No | - | Check parameters and retry |
| Data.limit = true | Wait | Wait for cooling period then retry | If immediate execution needed, manual |
| StatusCode = 500 | Yes | Max 2 retries, 5-second interval | If persistent, manual |
6. Best Practices
6.1 Performance Optimization
- Batch processing: If you need to refresh multiple devices, put them all in one DeviceIds array instead of making multiple calls
- Avoid frequent calls: Be mindful of rate limits; do not call repeatedly in a short period
- Allow adequate wait time: Wait 2-5 seconds after pushing before retrieving device info to ensure data is updated
6.2 Security Considerations
🟢 Read operation: No special security requirements.
6.3 Idempotency
This operation is naturally idempotent. Multiple calls are safe and produce no side effects (except potentially triggering rate limits).
7. Related Tools
7.1 Prerequisite Tools
| Tool Name | Purpose |
|---|---|
| Get All Devices | Get DeviceId and confirm device is online |
| Get a Device by Name | Get DeviceId by device name |
7.2 Follow-up Tools
| Tool Name | Purpose |
|---|---|
| Get All Devices | Retrieve updated device info after push |
7.3 Similar Tool Comparison
| Tool Name | Use Case | Difference |
|---|---|---|
| Get Device Info Push | Request device to report latest status | Asynchronous push, requires waiting then querying |
| Get All Devices | Get device information | Directly returns currently cached information |
8. Tool Chains
8.1 Get Real-Time Device Status
Scenario: You need the device's latest battery, network, and other real-time information.
Tool Chain:
Get Device Info Push → [Wait 2-5 seconds] → Get All Devices
Steps:
- Call Get Device Info Push to push a refresh command
- Check if Data.limit is false
- Wait 2-5 seconds for the device to report data
- Call Get All Devices to retrieve updated device info
8.2 Get Device Screenshot
Scenario: You need to capture the device's current screen.
Tool Chain:
Get Device Info Push (IsGetScreenshot=1) → [Wait 2-5 seconds] → Get All Devices
Steps:
- Call Get Device Info Push with IsGetScreenshot=1
- Wait 2-5 seconds
- Call Get All Devices to get device info; the screenshot URL is in the picture_url field
8.3 Confirm Device Status Before Remote Operation
Scenario: Before executing a remote command, you need to confirm the device is currently online and in a healthy state.
Tool Chain:
Get Device Info Push → [Wait 2-5 seconds] → Get All Devices → [Remote Operation]
Steps:
- Call Get Device Info Push to refresh device status
- Wait 2-5 seconds
- Call Get All Devices to confirm the device's online status
- If the device is online, proceed with the subsequent remote operation
Appendix Reference:
- Field Reference: https://www.goinsight.ai/tools/field-reference/
- Error Code Quick Reference: https://www.goinsight.ai/tools/error-codes/
Leave a Reply.