# getFilter

Fetch ONE saved filter by id, including its full `root` criteria tree: the only operation that returns the tree (listPropertyFilters / listContactFilters / listDealFilters return metadata only). Works for contact, property and deal filters. Call this BEFORE updateFilter whenever you are changing PART of a filter: updateFilter replaces `root` wholesale, so without reading the current tree first you would be re-authoring it blind and would silently drop every condition you didn't know was there. Read it, modify the one condition you mean to change, and send the modified tree back. The tree is saveFilter's DSL. Tag and list conditions hold ids: name them via searchContactTags (searchPropertyTags for PROPERTY). `queryOptions` (PROPERTY only) holds execution options outside the tree: `{ includeIncompleteRecords: true }` runs the filter with the completeness gate OFF (~39% more of the index), which is why a count can exceed what the tree explains.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getFilter", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `filterId`: `ID!` (required)

## Response (data, an example)

```json
{
  "filterQuery": {
    "getFilter": {
      "id": "<ID>",
      "name": "…",
      "type": "PROPERTY",
      "description": "…",
      "folderId": "<ID>",
      "root": "…",
      "queryOptions": "…",
      "isPrivate": true,
      "isDefault": true,
      "userId": "…",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getFilter",
    "variables": {
      "filterId": "<filterId>"
    }
  }'
```
