> ## 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

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

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

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Collaborators

Path: `bugsnag.db.collaborators.search`

```ts theme={null}
const rows = await corsair.bugsnag.db.collaborators.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 |
| `two_factor_enabled`       | `boolean` | equals                                     |
| `two_factor_enabled_on`    | `string`  | equals, contains, startsWith, endsWith, in |
| `password_updated_on`      | `string`  | equals, contains, startsWith, endsWith, in |
| `show_time_in_utc`         | `boolean` | equals                                     |
| `heroku`                   | `boolean` | equals                                     |
| `recovery_codes_remaining` | `number`  | equals, gt, gte, lt, lte, in               |
| `is_admin`                 | `boolean` | equals                                     |
| `pending_invitation`       | `boolean` | equals                                     |
| `last_request_at`          | `string`  | equals, contains, startsWith, endsWith, in |
| `paid_for`                 | `boolean` | equals                                     |
| `managed_by_smartbear_id`  | `boolean` | equals                                     |
| `created_at`               | `string`  | equals, contains, startsWith, endsWith, in |

*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](/concepts/database).*

***

## Organizations

Path: `bugsnag.db.organizations.search`

```ts theme={null}
const rows = await corsair.bugsnag.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 |
| `slug`                         | `string`  | equals, contains, startsWith, endsWith, in |
| `api_key`                      | `string`  | equals, contains, startsWith, endsWith, in |
| `collaborators_url`            | `string`  | equals, contains, startsWith, endsWith, in |
| `projects_url`                 | `string`  | equals, contains, startsWith, endsWith, in |
| `auto_upgrade`                 | `boolean` | equals                                     |
| `upgrade_url`                  | `string`  | equals, contains, startsWith, endsWith, in |
| `can_start_pro_trial`          | `boolean` | equals                                     |
| `pro_trial_ends_at`            | `string`  | equals, contains, startsWith, endsWith, in |
| `pro_trial_feature`            | `boolean` | equals                                     |
| `managed_by_platform_services` | `boolean` | equals                                     |
| `created_at`                   | `string`  | equals, contains, startsWith, endsWith, in |
| `updated_at`                   | `string`  | equals, contains, startsWith, endsWith, in |

*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](/concepts/database).*

***

## Projects

Path: `bugsnag.db.projects.search`

```ts theme={null}
const rows = await corsair.bugsnag.db.projects.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 |
| `organization_id`                | `string`  | equals, contains, startsWith, endsWith, in |
| `slug`                           | `string`  | equals, contains, startsWith, endsWith, in |
| `name`                           | `string`  | equals, contains, startsWith, endsWith, in |
| `api_key`                        | `string`  | equals, contains, startsWith, endsWith, in |
| `upload_api_key`                 | `string`  | equals, contains, startsWith, endsWith, in |
| `must_use_upload_api_key`        | `boolean` | equals                                     |
| `type`                           | `string`  | equals, contains, startsWith, endsWith, in |
| `is_full_view`                   | `boolean` | equals                                     |
| `language`                       | `string`  | equals, contains, startsWith, endsWith, in |
| `errors_url`                     | `string`  | equals, contains, startsWith, endsWith, in |
| `events_url`                     | `string`  | equals, contains, startsWith, endsWith, in |
| `url`                            | `string`  | equals, contains, startsWith, endsWith, in |
| `html_url`                       | `string`  | equals, contains, startsWith, endsWith, in |
| `open_error_count`               | `number`  | equals, gt, gte, lt, lte, in               |
| `for_review_error_count`         | `number`  | equals, gt, gte, lt, lte, in               |
| `collaborators_count`            | `number`  | equals, gt, gte, lt, lte, in               |
| `teams_count`                    | `number`  | equals, gt, gte, lt, lte, in               |
| `custom_event_fields_used`       | `number`  | equals, gt, gte, lt, lte, in               |
| `resolve_on_deploy`              | `boolean` | equals                                     |
| `performance_display_type`       | `string`  | equals, contains, startsWith, endsWith, in |
| `default_performance_percentile` | `string`  | equals, contains, startsWith, endsWith, in |
| `stability_target_type`          | `string`  | equals, contains, startsWith, endsWith, in |
| `created_at`                     | `string`  | equals, contains, startsWith, endsWith, in |
| `updated_at`                     | `string`  | equals, contains, startsWith, endsWith, in |

*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](/concepts/database).*

***

## Teams

Path: `bugsnag.db.teams.search`

```ts theme={null}
const rows = await corsair.bugsnag.db.teams.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 |
| `collaborator_count` | `number` | equals, gt, gte, lt, lte, in               |
| `project_count`      | `number` | equals, gt, gte, lt, lte, in               |

*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](/concepts/database).*

***
