---
title: "List AWS on demand tasks"
method: GET
path: "/api/v2/agentless_scanning/ondemand/aws"
tags: ["Agentless Scanning"]
---

# List AWS on demand tasks

`GET /api/v2/agentless_scanning/ondemand/aws`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/agentless_scanning/ondemand/aws`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `security_monitoring_findings_read`

Fetches the most recent 1000 AWS on demand tasks.

## Response `200`

OK

- AwsOnDemandListResponse: Response object that includes a list of AWS on demand tasks.
  - `data` AwsOnDemandData[]: A list of on demand tasks.
    - `attributes` AwsOnDemandAttributes: Attributes for the AWS on demand task.
      - `arn` string: The arn of the resource to scan.
      - `assigned_at` string: Specifies the assignment timestamp if the task has been already assigned to a scanner.
      - `created_at` string: The task submission timestamp.
      - `status` string: Indicates the status of the task. QUEUED: the task has been submitted successfully and the resource has not been assigned to a scanner yet. ASSIGNED: the task has been assigned. ABORTED: the scan has been aborted after a period of time due to technical reasons, such as resource not found, insufficient permissions, or the absence of a configured scanner.
    - `id` string: The UUID of the task.
    - `type` 'aws_resource': The type of the on demand task. The value should always be `aws_resource`.

## Other responses

- `403`: Not Authorized
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
