Filtering

Use the Filter builder — you shouldn't have to know the grammar. It composes a valid filter from readable helpers (eq, gt, like, in, and, or) and handles operators, escaping and grouping for you. The raw DSL below is the reference for power users and for reading what the builder produces.

from boostspace import Filter
bs.spaces.list(filter=Filter.equals("color", "#4A90D9").and_(Filter.greater_than_or_equal("id", 3)))
bs.spaces.list(filter=Filter.any_of(Filter.equals("name", "Acme"), Filter.equals("name", "Globex")))
bs.spaces.list(filter=Filter.contains("name", "acme"))          # ~ %acme%
import { Filter } from "@boost-space/sdk";
bs.spaces.list({ filter: Filter.equals("color", "#4A90D9").and(Filter.greaterThanOrEqual("id", 3)).build() });
bs.spaces.list({ filter: Filter.contains("name", "acme").build() });
use BoostSpace\Sdk\Runtime\Filter;
$bs->spaces->list(filter: (string) Filter::equals('color', '#4A90D9')->and(Filter::greaterThanOrEqual('id', 3)));
bs.Spaces.List(ctx, boostspace.ListParams{
    Filter: boostspace.FilterEquals("color", "#4A90D9").And(boostspace.FilterGreaterThanOrEqual("id", "3")).String(),
})

Readable helpers, one per operator: equals, notEquals, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, in, isNull, and like/notLike (raw % control). Plus wildcard shortcuts so you never type %: contains (→ ~ %v%), startsWith (→ ~ v%), endsWith (→ ~ %v). Combine with and/or (OR nested in AND is parenthesised automatically). A plain string is still accepted anywhere a filter is expected, so the raw DSL remains an escape hatch.

Raw grammar (reference)

Every list endpoint accepts a filter string in the Boost.space filter DSL. The SDK URL-encodes it for you — you never encode >, ;, | or % yourself.

filter = condition ( (";" | "&" | "|") condition )*
condition = field operator value
  • ; or & join conditions with AND.
  • | joins with OR.
  • Parentheses group: (a|b);c = (a OR b) AND c.

Operators

Operator Meaning Example
= equals (empty value also matches NULL) status=1
!= not equals status!=1
> >= < <= numeric / date comparison id>3
~ LIKE — % is the wildcard (empty matches NULL/empty) name~%acme%
!~ NOT LIKE name!~%test%
... IN a comma-separated set id...3,5,7

> These nine operators are the whole grammar (from the API's FormulaOperator). > There is no user-facing "NOT IN" — negate with != or compose with !~. > IN takes a comma-separated list after ... (id...3,5,7). The SDK > URL-encodes the whole expression (~, %, ..., |, spaces) for you — the > builder produces the raw string, the HTTP layer encodes it. Verified live: > Filter.in_("id",[3,5,7])id...3,5,7 → rows 3,5,7; not_like("name","%a%") > → name!~%a%.

Verified examples

Run live against the seeded API (GET /space), results are record IDs:

Filter Result
id>3 5,6,7,8
id>=3;id<=6 3,5,6 (range, AND)
name~%a% 1,2,3,5,6 (LIKE)
id=1|id=7 1,7 (OR)

Per language

bs.spaces.list(filter="id>=3;id<=6")           # Python
bs.spaces.list({ filter: "id>=3;id<=6" });      // TypeScript
$bs->spaces->list(filter: 'id>=3;id<=6');       // PHP
bs.Spaces.List(ctx, boostspace.ListParams{Filter: "id>=3;id<=6"}) // Go

> The full grammar lives in the API's shared filter parameter description, so > it also appears in every list method's generated doc comment and in > sdk-catalog.json.