---
title: "GET /audit/tasks/{taskId}"
method: GET
path: "/audit/tasks/{taskId}"
---

# GET /audit/tasks/{taskId}

`GET /audit/tasks/{taskId}`

Gets information about a Device Defender audit.

Requires permission to access the [DescribeAuditTask](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Path parameters

- `taskId` string, required

## Response `200`

Success

- DescribeAuditTaskResponse
  - `taskStatus` 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELED' — The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
  - `taskType` 'ON_DEMAND_AUDIT_TASK' | 'SCHEDULED_AUDIT_TASK' — The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
  - `taskStartTime` string, date-time — The time the audit started.
  - `taskStatistics` object — Statistical information about the audit.
    - `totalChecks` integer — The number of checks in this audit.
    - `inProgressChecks` integer — The number of checks in progress.
    - `waitingForDataCollectionChecks` integer — The number of checks waiting for data collection.
    - `compliantChecks` integer — The number of checks that found compliant resources.
    - `nonCompliantChecks` integer — The number of checks that found noncompliant resources.
    - `failedChecks` integer — The number of checks.
    - `canceledChecks` integer — The number of checks that did not run because the audit was canceled.
  - `scheduledAuditName` string — The name of the scheduled audit (only if the audit was a scheduled audit).
  - `auditDetails` object — Detailed information about each check performed during this audit.

## Other responses

- `480` — InvalidRequestException
- `481` — ResourceNotFoundException
- `482` — ThrottlingException
- `483` — InternalFailureException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/revisions/deef5c4b09f0/schema)
