Skip to content

Commit 5ba3dda

Browse files
committed
Docs: Updated list entities endpoint doc.
1 parent c6386c8 commit 5ba3dda

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

docs/api.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,27 @@ v -> some_embedded_dict_field
198198

199199
## List entities
200200

201-
List latest snapshots of all ids present in database under entity type.
201+
List latest snapshots of all ids present in database under entity type,
202+
filtered by `generic_filter` and `fulltext_filters`.
203+
Contains only the latest snapshot per entity.
202204

203-
Contains only latest snapshot.
205+
Uses pagination, default limit is 20, setting to 0 will return all results.
204206

205-
Uses pagination.
207+
Fulltext filters are interpreted as regular expressions.
208+
Only string values may be filtered this way. There's no validation that queried attribute
209+
can be fulltext filtered.
210+
Only plain and observation attributes with string-based data types can be queried.
211+
Array and set data types are supported as well as long as they are not multi value
212+
at the same time.
213+
If you need to filter EIDs, use attribute `eid`.
214+
215+
Generic filter allows filtering using generic MongoDB query (including `$and`, `$or`,`$lt`, etc.).
216+
For querying non-JSON-native types, you can use the following magic strings,
217+
as are defined by the search & replace [`magic`][dp3.database.magic] module.
218+
219+
There are no attribute name checks (may be added in the future).
220+
221+
Generic and fulltext filters are merged - fulltext overrides conflicting keys.
206222

207223
### Request
208224

@@ -212,6 +228,8 @@ Uses pagination.
212228

213229
- skip: how many entities to skip (default: 0)
214230
- limit: how many entities to return (default: 20)
231+
- fulltext_filters: dictionary of fulltext filters (default: no filters)
232+
- generic_filter: dictionary of generic filters (default: no filters)
215233

216234
### Response
217235

0 commit comments

Comments
 (0)