# Asset Discovery Custom Discovery Rule Search

POST /easm/discovery/custom-rules/search: Lists your custom discovery rules.

Source: https://docs.deepinfo.com/reference/easm/asset-discovery-custom-discovery-rule-search/

Last updated: 2026-09-27

---
`POST https://api.deepinfo.com/v1/easm/discovery/custom-rules/search`

Lists your custom discovery rules.

## Authentication

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

## Request Body

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

```json
{}
```

## Filtering

This search takes `filters` as an object with one key per field, not as a `must` list. Each field takes the operators of its filter type as keys, and fields combine with AND. `sort` is one `{field, order}` object, not a list. Example body:

```json
{
  "filters": {
    "name": {
      "equals": [
        "<value>"
      ]
    }
  },
  "sort": {
    "field": "name",
    "order": "desc"
  }
}
```

Operators by field:

| Field | Operators |
|---|---|
| `name` | `equals`, `not_equals`, `contains`, `not_contains`, `startswith`, `endswith`; each takes a list of values |
| `discovered_asset_count` | `gt`, `gte`, `lt`, `lte` |
| `tags` | `equals`, `not_equals`, `contains`, `not_contains`, `startswith`, `endswith`; each takes a list of values |
| `enabled` | a plain boolean value |
| `create_date` | `gt`, `gte`, `lt`, `lte` |
| `last_update_date` | `gt`, `gte`, `lt`, `lte` |

### Searchable Fields

| Field | Description |
|---|---|
| `name` | The custom discovery rule's name, as you gave it. Matching is case-insensitive. |
| `discovered_asset_count` | How many assets the rule has discovered. |
| `tags` | The tags on the rule. |
| `enabled` | `true` for rules that are switched on, `false` for rules that are switched off. |
| `create_date` | When the rule was created (ISO 8601 date-time). |
| `last_update_date` | When the rule was last changed (ISO 8601 date-time). |

### Sortable Fields

| Field | Description |
|---|---|
| `name` | The custom discovery rule's name, as you gave it. Matching is case-insensitive. |
| `discovered_asset_count` | How many assets the rule has discovered. |
| `tags` | The tags on the rule. |
| `enabled` | `true` for rules that are switched on, `false` for rules that are switched off. |
| `create_date` | When the rule was created (ISO 8601 date-time). |
| `last_update_date` | When the rule was last changed (ISO 8601 date-time). |

## Response Fields

An array of objects:

| Field | Type | Description |
|---|---|---|
| `id` | string |  |
| `name` | string |  |
| `discovered_asset_count` | integer |  |
| `tags` | array of string |  |
| `enabled` | boolean |  |
| `create_date` | string | date-time |
| `last_update_date` | string | date-time |

## Response Schema

_Inferred from examples._ Built from the saved 2xx example response: the fields it contains, with the types seen there. It is not a contract. The response body is an array; `[]` marks its elements.

| Field | Type |
|---|---|
| `[].id` | string |
| `[].name` | string |
| `[].discovered_asset_count` | number |
| `[].tags` | array<string> |
| `[].enabled` | boolean |
| `[].create_date` | string |
| `[].last_update_date` | string |

## Examples

### 200 · OK

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/discovery/custom-rules/search' \
  -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
[
  {
    "id": "00000000000000000000000e8e040001",
    "name": "Main domains",
    "discovered_asset_count": 25,
    "tags": [
      "production"
    ],
    "enabled": true,
    "create_date": "2025-06-01T08:00:00Z",
    "last_update_date": "2025-07-01T08:00:00Z"
  },
  {
    "id": "00000000000000000000000e8e040002",
    "name": "Subsidiary domains",
    "discovered_asset_count": 26,
    "tags": [
      "production-2"
    ],
    "enabled": true,
    "create_date": "2025-05-25T08:00:00Z",
    "last_update_date": "2025-06-24T08:00:00Z"
  }
]
```

### 400 · Malformed JSON

```bash
curl -X POST 'https://api.deepinfo.com/v1/easm/discovery/custom-rules/search' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"filters": '
```

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

```json
{
  "code": 10400,
  "details": [
    "Invalid JSON data."
  ],
  "solution": "https://docs.deepinfo.com/reference/"
}
```
