Tool Name: airdroid_business_reboot_device
Risk Level: 🔴 High Risk
Execution Mode: ⏳ Asynchronous
Category: Remote Commands
Quick Start (Copy & Use)
One-liner: Remotely reboot a specified device
What you need: DeviceId (device ID), Confirm (must be set to true), Reason (reboot reason)
Success criteria: StatusCode = 200 and ErrorMessage is an empty string; returns Pid for tracking
What to do next: Use Get an Activity Log with the Pid to poll execution status
Minimal request example:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Confirm": true,
"Reason": "Device unresponsive, requires restart"
}
Minimal response example:
{
"Pid": "1770854462319857000",
"StatusCode": 200,
"ErrorMessage": ""
}
Recipes (Common Recipes)
Recipe 1: Reboot an unresponsive device
Scenario: Device is frozen or apps are unresponsive, requires remote reboot to recover
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Confirm": true,
"Reason": "Device unresponsive, requires restart"
}
Recipe 2: Scheduled maintenance reboot
Scenario: Batch reboot devices during maintenance windows to apply updates
{
"DeviceId": "abc123def456",
"Confirm": true,
"Reason": "Scheduled maintenance reboot for system updates"
}
Recipe 3: Track reboot status with Pid
Scenario: After issuing a reboot, confirm whether the device has successfully rebooted
- Call Reboot Device to get the Pid
- Use the Get an Activity Log tool to query status:
{
"Pid": "1770854462319857000"
}
Polling logic:
- Progress = "Executing" → continue polling (interval 5-10 seconds)
- Progress = "Success" → reboot succeeded
- Progress = "Failure" → check the FailReason field
1. Overview
1.1 Description
Remotely reboot a device managed by AirDroid Business. Applicable to scenarios such as unresponsive devices, applying system updates, or routine maintenance.
1.2 When to Use
- Device fault recovery: Device is frozen or apps are unresponsive; recover via remote reboot
- System maintenance: Reboot devices during scheduled maintenance windows to apply updates
- Performance optimization: Periodic reboots to clear memory and release resources
1.3 Execution Mode & Response
This operation is asynchronous — after the command is sent, the device may take seconds to minutes to respond.
- Return value: Pid (activity log ID)
- Tracking method: Use the Get an Activity Log tool with the Pid to query execution status
- Prerequisite: The device must be online to receive the command
- Typical duration: The device reboot process takes about 1-3 minutes; the device is offline during reboot
1.4 Prerequisites
| Condition | Description | How to Check |
|---|---|---|
| Device online | The device must be online to receive the reboot command | Use Get All Devices with {"online":"Online"} filter |
| User confirmation | Must obtain explicit user consent before execution | Confirm parameter must be set to true |
| Reason provided | A reboot reason must be supplied for auditing | Reason parameter must not be empty |
1.5 Prerequisite Tools
| Tool | Purpose | Necessity |
|---|---|---|
| Get All Devices | Obtain DeviceId and confirm device is online | 🔴 Required |
| Get a Device by Name | Query DeviceId by exact device name | If only the device name is known |
1.6 Comparison with Similar Tools
| Tool | Use Case | Difference |
|---|---|---|
| Reboot Device | Temporary fault recovery, scheduled maintenance | Device automatically powers back on |
| Power off a Device | Long-term device shutdown | Device stays off; requires physical action to power on |
| Lock a Device | Temporarily lock the screen | Does not affect device running state |
2. Inputs
2.1 Parameter List
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| DeviceId | string | ✅ Yes | - | Device unique identifier |
| Confirm | bool | ✅ Yes | - | Safety confirmation; must be set to true to execute |
| Reason | string | ✅ Yes | - | Reboot reason for the audit log |
2.2 Parameter Details
`DeviceId`
Device unique identifier.
- Type: string
- Format: Non-empty string
- Source:
- Obtained via the Get All Devices tool; use the device_id field from the response
- Obtained via the Get a Device by Name tool for exact name lookup
- How to fill in a GI node:
- Constant: Enter the device ID string directly, e.g. fa6edcff65ab444e8b5e0eb08df4175d
- Upstream reference: Map from the Get All Devices node's Devices[0].device_id field
- Example:
"fa6edcff65ab444e8b5e0eb08df4175d"
`Confirm`
Safety confirmation parameter.
- Type: bool
- Format: Must be true to execute the reboot operation
- Why required: Prevents accidental reboot triggers; ensures the user explicitly acknowledges and consents
- How to fill in a GI node:
- Constant: Only set to true after receiving explicit user consent
- Example:
true
⚠️ Important: If Confirm is false or not provided, the operation will not execute and returns an error.
`Reason`
Reboot reason.
- Type: string
- Format: Non-empty string; a clear description is recommended
- Why required: Logged for auditing purposes to support tracking and compliance
- How to fill in a GI node:
- Constant: e.g. "Device unresponsive, requires restart"
- Upstream reference: Obtain from user input or a ticketing system
- Example:
"Device unresponsive, requires restart"
2.3 Parameter Combination Logic
- All three parameters are required
- Confirm must be true and Reason must be non-empty for the operation to execute
- If Confirm = false, returns StatusCode = 200 with an ErrorMessage indicating confirmation is required
3. Outputs
3.1 Response Examples
Success response:
{
"Pid": "1770854462319857000",
"StatusCode": 200,
"ErrorMessage": ""
}
Confirmation not passed:
{
"Pid": "",
"StatusCode": 200,
"ErrorMessage": "Confirm must be true to execute device reboot."
}
Parameter error response:
{
"Pid": "",
"StatusCode": -1,
"ErrorMessage": "Invalid device_id."
}
Network error response:
{
"Pid": "",
"StatusCode": 500,
"ErrorMessage": "Request timeout after 60 seconds."
}
3.2 Field Descriptions
| Field Path | Type | Description |
|---|---|---|
| Pid | string | Activity log unique identifier (Process ID). Returned on success; used to track execution status |
| StatusCode | number | Status code. See 5.1 AB Three-Layer Error Codes |
| ErrorMessage | string | Error message. Empty string on success |
3.3 Pid Tracking
Use the returned Pid with the Get an Activity Log tool to track execution status:
| Progress Value | Meaning | Agent Action |
|---|---|---|
| Executing | Command queued or executing on device | Continue polling (interval 5-10 seconds) |
| Success | Execution succeeded | Task complete |
| Failure | Execution failed | Check the FailReason field |
| Overridden | Superseded by a newer command | No action needed |
4. Examples
4.1 Basic Example: Reboot an unresponsive device
Request:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Confirm": true,
"Reason": "Device unresponsive, requires restart"
}
Response:
{
"Pid": "789012",
"StatusCode": 200,
"ErrorMessage": ""
}
4.2 Advanced Example: Track status after reboot
Step 1: Call the reboot endpoint
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Confirm": true,
"Reason": "Scheduled maintenance reboot"
}
Step 2: Use the returned Pid to query the activity log
{
"Pid": "789012"
}
Step 3: Determine completion based on Progress
- Executing → wait 10 seconds and query again
- Success → reboot complete
- Failure → check FailReason for root cause
4.3 Error Example: Confirmation not provided
Request:
{
"DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
"Confirm": false,
"Reason": "Test reboot"
}
Response:
{
"Pid": "",
"StatusCode": 200,
"ErrorMessage": "Confirm must be true to execute device reboot."
}
5. Error Handling
5.1 AB Three-Layer Error Codes
Core principle: AB uses a three-layer error code strategy. The agent should decide how to handle based on StatusCode.
| StatusCode | Meaning | Scenario | Agent Action |
|---|---|---|---|
| -1 | Parameter validation error | Local validation failed (missing required params, format error) | ❌ Do not retry; fix parameters and re-call |
| 200 | Business success or business error | HTTP request succeeded; check ErrorMessage. Upstream HTTP errors (e.g., 401/403/404) are returned as StatusCode 200 with error detail in ErrorMessage | Empty ErrorMessage = success; non-empty = business error |
| 500 | Network/request exception | Timeout, connection failure, DNS resolution failure | ⚠️ May retry (max 2 times, 5-second interval) |
5.2 Common Errors
| StatusCode | ErrorMessage Example | Cause | Fix |
|---|---|---|---|
| 200 | Confirm must be true to execute device reboot. | Confirmation not provided | Set Confirm to true |
| 200 | Reason is required for device reboot operation. | Reason not provided | Fill in the Reason parameter |
| -1 | Invalid device_id. | Device ID empty or invalid | Use Get All Devices to obtain a valid device ID |
| -1 | access_token is invalid. | Auth token invalid | Check credential configuration |
| 500 | Request timeout after 60 seconds. | Request timeout | Retry later |
5.3 Agent Self-Healing Decision Table
| StatusCode | Auto-Retry | Retry Strategy | Manual Intervention |
|---|---|---|---|
| -1 | ❌ | - | Fix parameters and re-call |
| 200 (ErrorMessage non-empty) | ❌ | - | Fix based on error message |
| 500 | ⚠️ | Max 2 retries, 5-second interval | Escalate if persistent |
6. Best Practices
6.1 Performance Tips
- Confirm device is online: Check device status before rebooting to avoid sending commands to offline devices
- Batch operation intervals: When batch rebooting, add a 2-3 second delay between each call to reduce server load
6.2 Security Considerations
⚠️ Medium Risk Warning: This operation will cause the device to go temporarily offline (approx. 1-3 minutes), which may interrupt ongoing operations.
| Parameter | Note |
|---|---|
| Confirm | Must be set to true to execute; defaults to no-op (prevents accidental triggers) |
| Reason | Required for the audit log, e.g. "Device unresponsive, requires restart" |
Pre-execution checklist:
- ☐ Confirm the device is online
- ☐ Confirm the correct target device (avoid rebooting the wrong device)
- ☐ Notify the device holder (if applicable)
- ☐ Confirm no critical operations are running on the device
6.3 Idempotency
Idempotency: Non-idempotent. Each call triggers a new reboot command.
- If the device is already in the reboot process, a new reboot command will be ignored or overridden
- Avoid blind retries on timeout — instead use Get an Activity Log with the Pid to check status
6.4 Async Operation Tracking
Use the returned Pid with Get an Activity Log to track execution status:
| Progress Value | Meaning | Agent Action |
|---|---|---|
| Executing | Command queued or executing | Continue polling |
| Success | Execution succeeded | Task complete |
| Failure | Execution failed | Check the FailReason field |
| Overridden | Superseded by a newer command | No action needed |
Polling recommendations:
- Interval: 5-10 seconds
- Max polling attempts: 18 (approx. 1.5-3 minutes, accounting for device reboot time)
- On timeout: Prompt the user to manually check device status
7. Related Tools
7.1 Prerequisite Tools
| Tool | Purpose |
|---|---|
| Get All Devices | Obtain DeviceId and confirm device is online |
| Get a Device by Name | Query DeviceId by exact device name |
| Get Device Info Push | Refresh device real-time status (if latest data is needed) |
7.2 Follow-up Tools
| Tool | Purpose |
|---|---|
| Get an Activity Log | Track reboot execution status (using Pid) |
| Get All Devices | Confirm device comes back online after reboot |
7.3 Similar Tools Comparison
| Tool | Use Case | Difference |
|---|---|---|
| Reboot Device | Temporary reboot, fault recovery | Device powers back on automatically |
| Power off a Device | Long-term device shutdown | Requires physical action to power on |
| Lock a Device | Lock screen | Does not affect device running state |
8. Tool Chains
8.1 Fault Recovery Pattern
Scenario: Device is unresponsive; requires remote reboot to recover
Tool chain:
Get All Devices → Reboot Device → Get an Activity Log (poll) → Get All Devices
Steps:
- Call Get All Devices to obtain the target device's device_id and confirm it is online
- Call Reboot Device to send the reboot command and obtain the Pid
- Use Get an Activity Log with the Pid to poll until Progress = "Success"
- Call Get All Devices to confirm the device is back online
8.2 Batch Maintenance Reboot Pattern
Scenario: Reboot multiple devices during a maintenance window
Tool chain:
Get All Devices (filter target group) → [Loop] Reboot Device → Get an Activity Log
Steps:
- Call Get All Devices with Keyword={"group_name":"maintenance-group"} to get the target device list
- Iterate through devices and call Reboot Device for each (recommended 2-3 second interval)
- Collect all Pid values and use Get an Activity Log to batch-track status
Leave a Reply.