> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Database

> DNSFilter local sync: searchable entities, `.search()` filters, and operators.

The DNSFilter plugin syncs data locally. Use `corsair.dnsfilter.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

> [!NOTE]
>
> **New to Corsair?** See [database operations](https://docs.corsair.dev/concepts/database.md), [data synchronization](https://docs.corsair.dev/concepts/integrations.md), and [multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md).

## Ip Addresses

Path: `dnsfilter.db.ipAddresses.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.ipAddresses.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `address` | `string` | equals, contains, startsWith, endsWith, in |
| `policyId` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `comment` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Mac Addresses

Path: `dnsfilter.db.macAddresses.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.macAddresses.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `address` | `string` | equals, contains, startsWith, endsWith, in |
| `policyId` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `comment` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Networks

Path: `dnsfilter.db.networks.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.networks.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `policyId` | `string` | equals, contains, startsWith, endsWith, in |
| `blockPageId` | `string` | equals, contains, startsWith, endsWith, in |
| `scheduledPolicyId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `updatedAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Organizations

Path: `dnsfilter.db.organizations.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.organizations.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `updatedAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Policies

Path: `dnsfilter.db.policies.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.policies.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `updatedAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Scheduled Reports

Path: `dnsfilter.db.scheduledReports.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.scheduledReports.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `frequency` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `updatedAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Subnets

Path: `dnsfilter.db.subnets.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.subnets.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `from` | `string` | equals, contains, startsWith, endsWith, in |
| `to` | `string` | equals, contains, startsWith, endsWith, in |
| `networkId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `updatedAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Unblock Requests

Path: `dnsfilter.db.unblockRequests.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.unblockRequests.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `domain` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `resolvedAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## User Agents

Path: `dnsfilter.db.userAgents.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.userAgents.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `platform` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `networkId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |
| `lastSeenAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Users

Path: `dnsfilter.db.users.search`

```ts theme={null}
const rows = await corsair.dnsfilter.db.users.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `email` | `string` | equals, contains, startsWith, endsWith, in |
| `role` | `string` | equals, contains, startsWith, endsWith, in |
| `organizationId` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.