# Deleted Asset Export

POST /easm/deleted-assets/search:export: Exports every record matching filters (no pagination). format=csv returns CSV text; format=json returns a JSON array.

Source: https://docs.deepinfo.com/reference/easm/deleted-asset-export/

Last updated: 2026-09-27

---
`POST https://api.deepinfo.com/v1/easm/deleted-assets/search:export`

Exports every record matching `filters` (no pagination). `format=csv` returns CSV text; `format=json` returns a JSON array. Large exports can time out: narrow them with filters.

## Authentication

Send your API key in the `apikey` request header.

## Query Parameters

| Parameter | Required | Description | Example |
|---|---|---|---|
| `format` | Optional | One of: `json`, `csv`. | `csv` |

## Request Body

| Parameter | Type | Required | Description |
|---|---|---|---|
| `filters` | object | Optional | See [Filtering](#ref-filtering) below |
| `sort` | array | Optional | List of `{field, order}` |

```json
{}
```

## Filtering

Example body:

```json
{
  "filters": {
    "must": [
      {
        "name": "asset",
        "type": "eq",
        "value": "<value>"
      }
    ]
  },
  "sort": [
    {
      "field": "asset",
      "order": "desc"
    }
  ]
}
```

See [Getting Started → Search & Filters](/getting-started/search-and-filters/) for the operators.

The Request Template example holds this body with every filter of this endpoint, one entry per field, each with an operator the field accepts and a placeholder value. Copy it, keep the filters you need and set their values.

### Searchable Fields

Grouped by the operators they accept (measured against the API; sending another operator returns 400).

Operators: `eq`, `in`, `gte`, `lte`, `exists`

| Field | Description |
|---|---|
| `added_date` | When the asset was added to your inventory, before it was removed (UTC date-time). |
| `deleted_date` | When the asset was removed from your inventory (UTC date-time). |
| `latest_scan_date` | When the asset was last scanned before it was removed (UTC date-time). |
| `seems_inactive_first_seen` | When the asset was first found to seem inactive (UTC date-time). |
| `seems_inactive_last_seen` | When the asset was most recently found to seem inactive (UTC date-time). |

Operators: `eq`, `exists`

| Field | Description |
|---|---|
| `is_main_asset` | True when the asset was set as a main asset, the primary asset for all related assets, configurations and reports. |
| `seems_inactive` | True when the asset seemed inactive: no active DNS records or WHOIS information were found (for a subdomain: no DNS records). The Deleted Assets list flags such assets. |
| `discovery_enabled` | True when discovery used the asset as a starting point to find related assets. |

Operators: `eq`, `in`, `exists`

| Field | Description |
|---|---|
| `asset_type` | The asset type: `domain`, `subdomain`, `ip` or `website`. |
| `creation_method` | How the asset entered your inventory: `manually_added` (added directly), `manually_approved` (approved by someone in Discovery) or `auto_approved` (added by a discovery rule with auto approval). |

Operators: `eq`, `in`, `startswith`, `endswith`, `contains_any`, `contains_all`, `exists`

| Field | Description |
|---|---|
| `asset` | The removed asset's name: a domain, subdomain or IP address, or for a website asset `host:port`. |
| `tags` | Your own labels on the removed asset, such as a business unit or an environment. |

### Sortable Fields

| Field | Description |
|---|---|
| `asset` | The removed asset's name: a domain, subdomain or IP address, or for a website asset `host:port`. |
| `asset_type` | The asset type: `domain`, `subdomain`, `ip` or `website`. |
| `added_date` | When the asset was added to your inventory, before it was removed (UTC date-time). |
| `deleted_date` | When the asset was removed from your inventory (UTC date-time). |
| `creation_method` | How the asset entered your inventory: `manually_added` (added directly), `manually_approved` (approved by someone in Discovery) or `auto_approved` (added by a discovery rule with auto approval). |
| `latest_scan_date` | When the asset was last scanned before it was removed (UTC date-time). |
| `is_main_asset` | True when the asset was set as a main asset, the primary asset for all related assets, configurations and reports. |
| `seems_inactive` | True when the asset seemed inactive: no active DNS records or WHOIS information were found (for a subdomain: no DNS records). The Deleted Assets list flags such assets. |
| `seems_inactive_first_seen` | When the asset was first found to seem inactive (UTC date-time). |
| `seems_inactive_last_seen` | When the asset was most recently found to seem inactive (UTC date-time). |
| `discovery_enabled` | True when discovery used the asset as a starting point to find related assets. |

## Examples

### 200 · OK

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/deleted-assets/search:export?format=csv' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

`Content-Type: text/csv; charset=utf-8` · `deepinfo-request-id: 00000000-0000-4000-8000-0000356d0001`

```
id,asset,asset_type,added_date,deleted_date,tags,creation_method,latest_scan_date,is_main_asset,seems_inactive,seems_inactive_first_seen,seems_inactive_last_seen,discovery_enabled
000000000000000ea4f90001,acme.example,domain,2025-06-01T08:00:00Z,2025-07-31T08:00:00Z,,manually_added,2025-07-31T08:00:00Z,True,False,,,True
```

### 400 · Invalid Parameter (invalid format=invalid_value)

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/deleted-assets/search:export?format=invalid_value' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

`Content-Type: application/json` · `deepinfo-request-id: 00000000-0000-4000-8000-0000356d0001`

```json
{
  "code": 10400,
  "parameters": [
    {
      "param": "format",
      "details": [
        "Select a valid choice."
      ]
    }
  ],
  "solution": "https://docs.deepinfo.com/reference/"
}
```

### Request Template

The request only: a request template has no response.

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/deleted-assets/search:export?format=csv' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "must": [
      {
        "name": "added_date",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "deleted_date",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "latest_scan_date",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "seems_inactive_first_seen",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "seems_inactive_last_seen",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "is_main_asset",
        "type": "eq",
        "value": true
      },
      {
        "name": "seems_inactive",
        "type": "eq",
        "value": true
      },
      {
        "name": "discovery_enabled",
        "type": "eq",
        "value": true
      },
      {
        "name": "asset_type",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "creation_method",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "asset",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "tags",
        "type": "eq",
        "value": "<value>"
      }
    ]
  },
  "sort": [
    {
      "field": "asset",
      "order": "desc"
    }
  ]
}'
```
