Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSONAPI filter by date range

GET api how to send the filter parameter if the filter is a date range

eg :

GET /products?filter[created][ge]=2018-01-01&filter[created][le]=2017-01-01
like image 718
Kasun Avatar asked Jun 08 '26 03:06

Kasun


1 Answers

JSON:API specification is agnostic about filter strategy. But, the next way is implemented on various libraries (like ngx-jsonapi or neomerx json-api):

GET /products?filter[created][since]=2018-01-01&filter[created][until]=2020-01-01
like image 185
pablorsk Avatar answered Jun 11 '26 07:06

pablorsk