Skip to content

Commit 36c08fc

Browse files
committed
Add Filtres API documentation with usage examples and filter syntax
1 parent 97fae4a commit 36c08fc

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/Filtres_API.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Filtres API
2+
3+
## Usages
4+
### Filters
5+
#### Syntax
6+
`filters[PREFIX + FIELD]=SEARCH`
7+
#### Example
8+
`filters[=subject]=53`
9+
subject field equal to 53
10+
#### Usage
11+
```bash
12+
curl --request GET \
13+
--url 'http://localhost/search?limit=9999&filters%5B%5Esequence%5D=%2F53%2F&sort%5Bmetadata.createdAt%5D=-1&sort%5Bsubject%5D=1'
14+
15+
# limit=9999
16+
# filters[^sequence]=/53/
17+
# sort[metadata.createdAt]=-1
18+
# sort[subject]=1
19+
```
20+
#### List
21+
| Filter | Description |
22+
|--------|-----------------------|
23+
| : | Equal |
24+
| # | Number Equal |
25+
| !# | Number Not Equal |
26+
| !: | Not Equal |
27+
| \> | Greater Than |
28+
| \>| | Greater Than or Equal |
29+
| \< | Less Than |
30+
| \<| | Less Than or Equal |
31+
| @ | in |
32+
| !@ | not in |
33+
| @# | number in |
34+
| !@# | number not in |
35+
| \^ | regex |

0 commit comments

Comments
 (0)