---
title: "Scans devices immediately."
method: POST
path: "/api/v1/accounts/{accountId}/immediatescan"
---

# Scans devices immediately.

`POST /api/v1/accounts/{accountId}/immediatescan`

## Request

- Base URL: `https://api.usa.cloud.watchguard.com/rest/aether-endpoint-security/aether-mgmt`
- URL: `https://api.usa.cloud.watchguard.com/rest/aether-endpoint-security/aether-mgmt/api/v1/accounts/{accountId}/immediatescan`
- Auth: API key in header `WatchGuard-API-Key` and HTTP bearer
- TypeScript: <https://skmtc.dev/watchguard/apis/aether-endpoint-security-api/docs/api/v1/accounts/:accountId/immediatescan/post.ts> (a function with typed inputs; its response is checked against the schema)

Starts a task to scan the specified devices immediately.

## Path parameters

- `accountId` string, required

## Request body

- ScanTaskInput
  - `device_ids` string[]
  - `task_name` string: Name of the scan task.
  - `task_description` string: Description of the scan task.
  - `scan_scope` 0 | 1 | 2: Scope of the scan task. - 0: Whole computer - 1: Critical areas - 2: Specified items
  - `specified_items_to_scan` string[]: List of specific locations or items to scan. All folders and files in the specified locations are scanned. Works only when scan_scope is 2.
  - `detect_hacking_tools` boolean: Indicates whether to detect hacking tools.
  - `detect_suspicious_files` boolean: Indicates whether to detect suspicious files.
  - `scan_compressed_files` boolean: Indicates whether to scan compressed files. This decompresses compressed files and scans their contents.
  - `apply_exclusions_on_scan` boolean: Indicates whether to exclude items from the scan, such as specific files, files with a specific extension, or a specific directory.
  - `extensions_to_exclude` string[]: List of file extensions to exclude from the scan. Works only when apply_exclusions_on_scan is true.
  - `files_to_exclude` string[]: List of file names (with extensions) to exclude from the scan. Works only when apply_exclusions_on_scan is true.
  - `folders_to_exclude` string[]: List of folders to exclude from the scan. You must include the full path. Works only when apply_exclusions_on_scan is true.
  - `execution_window_expiration` string: Time period in which the scan must run before it times out. Default is 7 days.

## Response `200`

OK

- ScanTaskOutput
  - `task_id` string, uuid: ID of the completed scan task.
  - `no_executed_by_not_found_device_ids` string, uuid: If the action could not be completely executed, the list of device ids not found (not executed) will be returned here.

## Other responses

- `400`: BAD REQUEST.
- `403`: ACCESS DENIED.
- `404`: NOT FOUND.
- `405`: METHOD NOT ALLOWED.
- `500`: INTERNAL ERROR.

---

[API](https://skmtc.dev/watchguard/apis/aether-endpoint-security-api.md) - [All operations](https://skmtc.dev/watchguard/apis/aether-endpoint-security-api/llms.txt) - [OpenAPI document](https://skmtc.dev/watchguard/apis/aether-endpoint-security-api/revisions/1376eee70d39?raw)
