How to filter threads with query language
When using Comments and retrieving threads with our REST API, it’s possible to
filter for specific threads using
custom metadata and our custom query
language. This enables the
Get Threads REST API
to have filtering that works the same as with
useThreads
and
liveblocks.getThreads
.
Query language
You can filter threads by their metadata, allowing you to select for certain
properties, values, or even for string prefixes. Filters can be combined using
AND
logic.
How to use
To use the query language with the
REST API pass
your query string to the query
parameter. For example, given this query:
Encode it, and add it to the query
parameter:
To learn more on setting custom metadata on threads, make sure to read our guide.