---
title: "GET /audit/tasks#startTime&endTime"
method: GET
path: "/audit/tasks#startTime&endTime"
---

# GET /audit/tasks#startTime&endTime

`GET /audit/tasks#startTime&endTime`

Lists the Device Defender audits that have been performed during a given time period.

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

## Query parameters

- `startTime` string, date-time, required
- `endTime` string, date-time, required
- `taskType` 'ON_DEMAND_AUDIT_TASK' | 'SCHEDULED_AUDIT_TASK'
- `taskStatus` 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELED'
- `nextToken` string
- `maxResults` integer

## Response `200`

Success

- ListAuditTasksResponse
  - `tasks` AuditTaskMetadata[] — The audits that were performed during the specified time period.
    - `taskId` string — The ID of this audit.
    - `taskStatus` 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELED' — The status of this audit. One of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
    - `taskType` 'ON_DEMAND_AUDIT_TASK' | 'SCHEDULED_AUDIT_TASK' — The type of this audit. One of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
  - `nextToken` string — A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results.

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottlingException
- `482` — 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)
