Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Deterministic selector-based search with cardinality contracts for mutation targeting.- Operation ID:
query.match - API member path:
editor.doc.query.match(...) - Mutates document:
no - Idempotency:
idempotent - Supports tracked mode:
no - Supports dry run:
no - Deterministic target resolution:
yes
Expected result
Returns a QueryMatchOutput with the resolved target address and cardinality metadata.Input fields
| Field | Type | Required | Description | |
|---|---|---|---|---|
includeNodes | boolean | no | ||
limit | integer | no | ||
mode | enum | no | "strict", "candidates" | |
offset | integer | no | ||
require | enum | no | "any", "first", "exactlyOne", "all" | |
select | object(type=“text”) \ | object(type=“node”) | yes | One of: object(type=“text”), object(type=“node”) |
within | NodeAddress | no | NodeAddress |
Example request
Output fields
| Field | Type | Required | Description | |
|---|---|---|---|---|
evaluatedRevision | string | yes | ||
items | object(matchKind=“text”) \ | object(matchKind=“node”)[] | yes | |
meta | object | yes | ||
meta.effectiveResolved | boolean | yes | ||
page | PageInfo | yes | PageInfo | |
page.limit | integer | yes | ||
page.offset | integer | yes | ||
page.returned | integer | yes | ||
total | integer | yes |
Example response
Pre-apply throws
MATCH_NOT_FOUNDAMBIGUOUS_MATCHINVALID_INPUTINTERNAL_ERROR
Non-applied failure codes
- None
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema

