• Tools
Tools
  • Tools
loading...
No Results
  • ActiveCampaign
  • AirDroid Business
    • Index
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a group
    • Get a group id by group name
    • Get a device by name
    • Get a device app by name
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get device info push
    • Get device location report
    • Get device network connection history
    • Get device application usage duration
    • Get device application report
    • Get device online status report
    • Get device remote access report
    • Get data usage overview and trends
    • Get tag ids by tag names
    • Get top 10 apps by usage duration
    • Get top 10 data usage apps
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Set tags
    • Turn off device screen
    • Unenroll a device
    • Update a device name
    • Update a device remark
    • Update a group name
    • Update a group remark
  • Asana
  • AWS-S3
  • AWS Lambda
  • Appstore
  • BambooHR
  • Bitbucket
  • Brevo
  • Coda
  • Code
  • ConvertKit
  • CSV
  • Crypto
  • Clockify
  • Data Shaping
  • Date & Time
  • Delay
  • DingTalk
  • Discourse
  • Discord
  • Dropbox
  • Elastic Security
  • FeiShu
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Gitlab
  • Github
  • Grafana
  • Google Ads
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Harvest
  • HaloPSA
  • Hacker News
  • Hubspot
  • Help Scout
  • Intercom
  • Jira
  • Jenkins
  • Kafka
  • Lemlist
  • MySQL
  • Monday
  • Metabase
  • MailChimp
  • Microsoft Excel
  • Microsoft Outlook
  • Notion
  • Nextcloud
  • Odoo
  • Ortto
  • Okta
  • PayPal
  • Paddle
  • Pipedrive
  • PostHog
  • PostgreSQL
  • Qdrant
  • QRCode
  • QuickBooks
  • Redis
  • Stripe
  • Splunk
  • Shopify
  • Segment
  • ServiceNow
  • Search&Crawl
  • Text
  • Trello
  • Twilio
  • Todoist
  • Wikipedia
  • WordPress
  • WooCommerce
  • Xml
  • YouTube
  • Zulip
  • Zoom
  • Zendesk
  • Zammad
  • Zoho CRM
Home > Tools > AirDroid Business

Power off a device

Tool Name: airdroid_business_power_off_device

Risk Level: 🔴 High Risk

Execution Mode: ⏳ Asynchronous

Category: Remote Commands

Quick Start (Copy & Use)

One-liner: Remotely power off a specified device

What you need: DeviceId (device ID), Confirm (must be set to true), Reason (shutdown 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": "Scheduled maintenance shutdown"
}

Minimal response example:

{
  "Pid": "1770854462319857000",
  "StatusCode": 200,
  "ErrorMessage": ""
}

Recipes (Common Recipes)

Recipe 1: Scheduled maintenance shutdown

Scenario: Power off devices during a scheduled maintenance window to conserve energy or perform hardware servicing

{
  "DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
  "Confirm": true,
  "Reason": "Scheduled maintenance shutdown for hardware servicing"
}

Recipe 2: End-of-day power saving

Scenario: Power off kiosk or display devices at the end of business hours to save energy

{
  "DeviceId": "abc123def456",
  "Confirm": true,
  "Reason": "End-of-day shutdown for energy conservation"
}

Recipe 3: Track shutdown status with Pid

Scenario: After issuing a power off command, confirm whether the device has been shut down

  1. Call Power off a Device to get the Pid
  2. Use the Get an Activity Log tool to query status:
{
  "Pid": "1770854462319857000"
}

Polling logic:

  • Progress = "Executing" → continue polling (interval 5-10 seconds)
  • Progress = "Success" → shutdown succeeded
  • Progress = "Failure" → check the FailReason field

1. Overview

1.1 Description

Remotely power off a device managed by AirDroid Business. After execution, the device will be completely powered off and cannot be remotely powered on. Physical intervention is required to restart the device.

1.2 When to Use

  • Scheduled maintenance: Power off devices during planned maintenance windows for hardware servicing
  • Energy conservation: Shut down kiosk or display devices during off-hours
  • Security response: Power off a compromised device to prevent further damage
  • Device decommission: Shut down a device before physically retrieving it

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
  • Critical: Once powered off, the device cannot be remotely powered back on. Physical access is required to restart.

1.4 Prerequisites

Condition Description How to Check
Device online The device must be online to receive the shutdown 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 shutdown 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
Power off a Device Long-term device shutdown, maintenance Device stays off; requires physical action to power on
Reboot Device Temporary fault recovery, scheduled maintenance Device automatically powers back 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 false Safety confirmation; must be set to true to execute
Reason string ✅ Yes - Shutdown reason for the audit log

2.2 Parameter Details

`DeviceId`

Device unique identifier, specifying the target device to power off.

  • Type: string
  • Format: Non-empty string
  • Source:
    1. Obtained via the Get All Devices tool; use the device_id field from the response
    2. 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. This is a guardrail parameter for high-risk operations, preventing accidental execution of destructive actions.

  • Type: bool
  • Default: false (will not execute)
  • Must be set to true to execute: If false, the operation will be rejected with an error
  • How to fill in a GI node:
    • Constant: Only set to true after receiving explicit user consent
  • Example:
  true

⚠️ Important: The agent must ask the user for confirmation before calling this tool. Only set this parameter to true after receiving explicit user approval.

`Reason`

Reason for shutting down the device.

  • 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. "Scheduled maintenance shutdown"
    • Upstream reference: Obtain from user input or a ticketing system
  • Example:
  "Scheduled maintenance shutdown"

⚠️ Important: The Reason parameter must be provided by the user. The agent should not fabricate reasons.

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 set to true to execute this destructive operation."
}

Parameter error response:

{
  "Pid": "",
  "StatusCode": -1,
  "ErrorMessage": "Invalid device_id. Obtain via 'Get All Devices' or 'Get a Device by Name' tool."
}

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 via Get an Activity Log
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: Scheduled maintenance shutdown

Request:

{
  "DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
  "Confirm": true,
  "Reason": "Scheduled maintenance shutdown"
}

Response:

{
  "Pid": "1770854462319857000",
  "StatusCode": 200,
  "ErrorMessage": ""
}

4.2 Advanced Example: Track status after shutdown

Step 1: Call the power off endpoint

{
  "DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
  "Confirm": true,
  "Reason": "End-of-day energy conservation shutdown"
}

Step 2: Use the returned Pid to query the activity log

{
  "Pid": "1770854462319857000"
}

Step 3: Determine completion based on Progress

  • Executing → wait 10 seconds and query again
  • Success → shutdown complete
  • Failure → check FailReason for root cause

4.3 Error Example: Confirmation not provided

Request:

{
  "DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
  "Confirm": false,
  "Reason": "Test shutdown"
}

Response:

{
  "Pid": "",
  "StatusCode": 200,
  "ErrorMessage": "Confirm must be set to true to execute this destructive operation."
}

4.4 Error Example: Missing reason

Request:

{
  "DeviceId": "fa6edcff65ab444e8b5e0eb08df4175d",
  "Confirm": true,
  "Reason": ""
}

Response:

{
  "Pid": "",
  "StatusCode": 200,
  "ErrorMessage": "Reason is required for audit trail."
}

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 set to true to execute this destructive operation. Confirmation not provided Set Confirm to true
200 Reason is required for audit trail. 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 powering off to avoid sending commands to offline devices
  • Batch operation intervals: When batch powering off, add a 2-3 second delay between each call to reduce server load

6.2 Security Considerations

⚠️ High-Risk Operation Warning: This operation will power off the device and it cannot be remotely powered back on. Physical intervention is required to restart.

Parameter Note
Confirm Must be set to true to execute; defaults to false (prevents accidental triggers)
Reason Required for the audit log, e.g. "Scheduled maintenance shutdown"

Pre-execution checklist:

  1. ☐ Confirm the device is online
  2. ☐ Confirm the correct target device (avoid powering off the wrong device)
  3. ☐ Notify the device holder (if applicable)
  4. ☐ Confirm no critical operations are running on the device
  5. ☐ Understand the irreversibility — the device cannot be remotely powered back on
  6. ☐ Ensure physical access is available if the device needs to be restarted

6.3 Idempotency

Idempotency: Non-idempotent. Each call triggers a new shutdown command.

  • If the device is already in the shutdown process, a new shutdown command may 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: 12 (approx. 1-2 minutes)
  • 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 shutdown execution status (using Pid)

7.3 Similar Tools Comparison

Tool Use Case Difference
Power off a Device Long-term device shutdown, maintenance Device stays off; requires physical action to power on
Reboot Device Temporary fault recovery, scheduled maintenance Device automatically powers back on
Lock a Device Lock screen Does not affect device running state
Turn Off Device Screen Turn off screen only Device remains on and running

8. Tool Chains

8.1 Scheduled Maintenance Shutdown Pattern

Scenario: Power off devices in a specific group during a maintenance window

Tool chain:

Get All Devices → Power off a Device → Get an Activity Log (poll)

Steps:

  1. Call Get All Devices with Keyword={"group_name":"maintenance-group"} and SelectedColumns=["device_id","device_name","online"] to get the target device list
  2. Ask the user for confirmation before proceeding
  3. Iterate through online devices and call Power off a Device for each (recommended 2-3 second interval)
  4. Collect all Pid values and use Get an Activity Log to batch-track status

8.2 Security Incident Response Pattern

Scenario: Power off a compromised device to prevent further damage

Tool chain:

Get a Device by Name → Power off a Device → Get an Activity Log (poll)

Steps:

  1. Call Get a Device by Name to find the compromised device's device_id
  2. Ask the user for confirmation, explaining the device cannot be remotely restarted
  3. Call Power off a Device with a clear reason (e.g., "Security incident: suspected unauthorized access")
  4. Use Get an Activity Log with the Pid to confirm the shutdown was successful

8.3 End-of-Day Batch Shutdown Pattern

Scenario: Power off all kiosk devices at the end of business hours

Tool chain:

Get All Devices (filter by group + online) → [Loop] Power off a Device → Get an Activity Log

Steps:

  1. Call Get All Devices with Keyword={"online":"Online"} to get all online devices
  2. Filter devices by group name in the response if needed
  3. Ask the user for confirmation for the entire batch
  4. Iterate and call Power off a Device for each device (2-3 second interval)
  5. Collect all Pid values and batch-track using Get an Activity Log

Appendix Reference:

  • Field Reference: https://www.goinsight.ai/tools/field-reference/
  • Error Code Quick Reference: https://www.goinsight.ai/tools/error-codes/
Updated on: Feb 13, 2026
Was This Page Helpful?
Prev Open app to foreground
Next Reboot device
Discussion

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
On this page
  • Quick Start (Copy & Use)
  • Recipes (Common Recipes)
    • Recipe 1: Scheduled maintenance shutdown
    • Recipe 2: End-of-day power saving
    • Recipe 3: Track shutdown status with Pid
  • 1. Overview
    • 1.1 Description
    • 1.2 When to Use
    • 1.3 Execution Mode & Response
    • 1.4 Prerequisites
    • 1.5 Prerequisite Tools
    • 1.6 Comparison with Similar Tools
  • 2. Inputs
    • 2.1 Parameter List
    • 2.2 Parameter Details
    • 2.3 Parameter Combination Logic
  • 3. Outputs
    • 3.1 Response Examples
    • 3.2 Field Descriptions
    • 3.3 Pid Tracking
  • 4. Examples
    • 4.1 Basic Example: Scheduled maintenance shutdown
    • 4.2 Advanced Example: Track status after shutdown
    • 4.3 Error Example: Confirmation not provided
    • 4.4 Error Example: Missing reason
  • 5. Error Handling
    • 5.1 AB Three-Layer Error Codes
    • 5.2 Common Errors
    • 5.3 Agent Self-Healing Decision Table
  • 6. Best Practices
    • 6.1 Performance Tips
    • 6.2 Security Considerations
    • 6.3 Idempotency
    • 6.4 Async Operation Tracking
  • 7. Related Tools
    • 7.1 Prerequisite Tools
    • 7.2 Follow-up Tools
    • 7.3 Similar Tools Comparison
  • 8. Tool Chains
    • 8.1 Scheduled Maintenance Shutdown Pattern
    • 8.2 Security Incident Response Pattern
    • 8.3 End-of-Day Batch Shutdown Pattern
loading...
No Results