# Discovered Asset Export

POST /easm/discovery/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/discovered-asset-export/

Last updated: 2026-09-27

---
`POST https://api.deepinfo.com/v1/easm/discovery/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
{
  "filters": {
    "must": [
      {
        "name": "state",
        "type": "eq",
        "value": "approved"
      }
    ]
  }
}
```

## Filtering

Example body:

```json
{
  "filters": {
    "must": [
      {
        "name": "state",
        "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`, `startswith`, `endswith`, `wildcard`, `fuzzy`, `contains_any`, `contains_all`, `exists`

| Field | Description |
|---|---|
| `asset` | The discovered asset's name: a domain, subdomain or IP address, or for a website asset `host:port`. |
| `discovery_history.id` | The ID of a discovery rule that found the asset, a 32-character hex string; the Discovery page's rule name filter sends this ID. |
| `discovery_history.seed_value` | The seed value a rule started from when it found the asset, such as an IP address, a certificate fingerprint, a phone number or an organization name. |
| `organization_name` | An organization name recorded for the discovered asset; in the samples it is set only on some domains and holds WHOIS-style values such as `redacted for privacy`. |

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

| Field | Description |
|---|---|
| `last_discovery_date` | When a rule last found the asset, shown as the discovery date in Discovery (UTC date-time). |
| `ignore_date` | When the asset was ignored in Discovery (UTC date-time); empty unless it is ignored. |
| `approve_date` | When the asset was approved into your inventory (UTC date-time); empty unless it is approved. |

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

| Field | Description |
|---|---|
| `asset_type` | The discovered asset's type: `domain`, `subdomain`, `ip` or `website`. |
| `state` | The review state: `in_review` (found by a rule, waiting for a decision), `approved` (added to your inventory) or `ignored` (dismissed; it stays out of your inventory). |

### Sortable Fields

| Field | Description |
|---|---|
| `asset` | The discovered asset's name: a domain, subdomain or IP address, or for a website asset `host:port`. |
| `state` | The review state: `in_review` (found by a rule, waiting for a decision), `approved` (added to your inventory) or `ignored` (dismissed; it stays out of your inventory). |
| `discovery_history` | The rule matches that found the asset, each with the rule ID, rule name, rule type (`smart_discovery`, `smart_monitoring` or `custom`), seed value and discovery date. |
| `last_discovery_date` | When a rule last found the asset, shown as the discovery date in Discovery (UTC date-time). |
| `organization_name` | An organization name recorded for the discovered asset; in the samples it is set only on some domains and holds WHOIS-style values such as `redacted for privacy`. |
| `ignore_date` | When the asset was ignored in Discovery (UTC date-time); empty unless it is ignored. |
| `approve_date` | When the asset was approved into your inventory (UTC date-time); empty unless it is approved. |

## Examples

### 200 · OK

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/discovery/assets/search:export?format=csv' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "must": [
      {
        "name": "state",
        "type": "eq",
        "value": "approved"
      }
    ]
  }
}'
```

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

```
id,asset,state,asset_type,discovery_history.id,discovery_history.rule,discovery_history.rule_type,discovery_history.seed_value,discovery_history.description,discovery_history.discovery_date,last_discovery_date,organization_name,ignore_date,approve_date
00000000000000000000000ea4f90001,acme.example,approved,domain,00000000000000000000000e56420001,Main domains,smart_monitoring,Acme text,,2025-06-01T08:00:00Z,2025-06-01T08:00:00Z,,,2025-06-01T08:00:00Z
00000000000000000000000ea4f90002,fernhill.example,approved,domain,00000000000000000000000e56420002,Subsidiary domains,custom,,,2025-05-25T08:00:00Z,2025-05-25T08:00:00Z,,,2025-05-25T08:00:00Z
00000000000000000000000ea4f90003,kestrel.example,approved,domain,00000000000000000000000e56420003,Certificate names,smart_discovery,Acme text 3,,2025-05-18T08:00:00Z,2025-05-18T08:00:00Z,,,2025-05-18T08:00:00Z
```

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

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/discovery/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/"
}
```

### 500 · Validation Error (empty body {})

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/discovery/assets/search:export' \
  -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": -1,
  "details": [
    "An unexpected error has occurred."
  ]
}
```

### Request Template

The request only: a request template has no response.

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/discovery/assets/search:export?format=csv' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "must": [
      {
        "name": "asset",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "discovery_history.id",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "discovery_history.seed_value",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "organization_name",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "last_discovery_date",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "ignore_date",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "approve_date",
        "type": "eq",
        "value": "<date-time>"
      },
      {
        "name": "asset_type",
        "type": "eq",
        "value": "<value>"
      },
      {
        "name": "state",
        "type": "eq",
        "value": "<value>"
      }
    ]
  },
  "sort": [
    {
      "field": "asset",
      "order": "desc"
    }
  ]
}'
```
