Tags can be filtered by all their fields, and they support powerful combinations that allow you to
amongst many other excellent use cases.
This page will guide you through everything you need to know to construct creative filters to get great insights from your community.
Fields and types for filtering and sorting
The following table shows all the possible fields for which tags can be filtered and sorted. The filter type defines which type-specific operators can be used. All fields can be used with general operators and composition.
Sortable fields can always be sent as {fieldName}_{ASC | DESC}
Field | Filter type | Example | Sortable |
---|---|---|---|
name | String | {"name": {"textContains": "contributor"}} | ✔️ |
members | Many-to-Many | {"members: ["94924f9e-b23e-463f-984e-f75a34f021aa"]} | ✘ |
createdAt | Date | {"createdAt": {"gte": "2022-01-01"}} | ✔️ |
Examples
Tags with a specific set of names
name
is in open-source, contributor, or advocate
{
"filter": {
"name": {
"in": ["open-source", "contributor", "advocate"]
}
},
"orderBy": "createdAt_DESC",
"limit": 10,
"offset": 0
}
Tags related to certain members and whose name contains founder
- members contains one of m1Id, m2Id, or m3Id, and
- the name contains founder
{
"filter": {
"members": [
"m1Id",
"m2Id",
"m3Id"
],
"name": {
"textContains": "founder
}
},
"orderBy": "createdAt_DESC",
"limit": 20,
"offset": 10
}