# Asset Discovery Custom Discovery Rule Detail

GET /easm/discovery/custom-rules/{rule_id}: Returns one custom discovery rule.

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

Last updated: 2026-09-27

---
`GET https://api.deepinfo.com/v1/easm/discovery/custom-rules/{rule_id}`

Returns one custom discovery rule.

## Authentication

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

## Path Parameters

| Parameter | Required | Description | Example |
|---|---|---|---|
| `rule_id` | Required |  | `00000000000000000000000e8e040001` |

## Response Fields

| Field | Type | Description |
|---|---|---|
| `id` | string |  |
| `name` | string |  |
| `filters` | object |  |
| `tags` | array of string |  |
| `auto_approval` | boolean |  |
| `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.

| Field | Type |
|---|---|
| `id` | string |
| `name` | string |
| `filters` | object |
| `filters.must` | array<object> |
| `filters.must[].name` | string |
| `filters.must[].value` | string |
| `filters.must[].type` | string |
| `filters.must_not` | array |
| `filters.should` | array |
| `tags` | array<string> |
| `auto_approval` | boolean |
| `enabled` | boolean |
| `create_date` | string |
| `last_update_date` | string |

## Examples

### 200 · OK

```bash
curl 'https://api.deepinfo.com/v1/easm/discovery/custom-rules/00000000000000000000000e8e040001' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

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

```json
{
  "id": "00000000000000000000000e8e040001",
  "name": "Main domains",
  "filters": {
    "must": [
      {
        "name": "webdata.http.final_domain",
        "value": "acme.example",
        "type": "eq"
      }
    ],
    "must_not": [],
    "should": []
  },
  "tags": [
    "production"
  ],
  "auto_approval": false,
  "enabled": true,
  "create_date": "2025-06-01T08:00:00Z",
  "last_update_date": "2025-07-01T08:00:00Z"
}
```

### 404 · Not Found (nonexistent rule_id)

```bash
curl 'https://api.deepinfo.com/v1/easm/discovery/custom-rules/ffffffffffffffffffffffff' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

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

```json
{
  "code": 30003,
  "details": [
    "Custom rule does not exist."
  ],
  "solution": "https://docs.deepinfo.com/reference/"
}
```
