Filtering an api request

68 views
Skip to first unread message

jpgol...@gmail.com

unread,
Jan 15, 2019, 9:33:01 AM1/15/19
to Fusio
Hi! I have successfully set up Fusio using Docker-compose method and have also successfully set up a public endpoint for a MySQL table. 

My question is: how do I filter this request using the URL only?

The endpoint is http://<fusio-url>/stallions

I want to only show the entries for which the field cover_year is 2017.

How do I do this? I've tried ?filter[cover_year]=2017 and some other variations of this but none have worked yet.

Thanks,

Jared

Christoph Kappestein

unread,
Jan 15, 2019, 2:35:02 PM1/15/19
to Fusio
Hi Jared,

to give you a quick answer, you can use the following query parameters:

?filterBy=cover_year&filterOp=equals&filterValue=2017

The filterOp parameter can contain different compare operators:
- contains
- equals
- startsWith
- present

best regards
Christoph



Luiz Ribeiro

unread,
Sep 1, 2023, 10:55:01 AM9/1/23
to Fusio

Hello   Christoph, 

I have 2 fields that I need to filter (FieldA=3 and FieldB=1), for example, how should I create the filterBy?

Christoph Kappestein

unread,
Sep 2, 2023, 3:02:36 PM9/2/23
to Fusio
Hi Luiz,

this is currently not possible, so you can filter only one column. If this is a feature which also many other users need we could try to find a solution,
but then we need to find a fitting query format to enable this.

best regards
Christoph

Reply all
Reply to author
Forward
0 new messages