empty lungs
empty lungs

Reputation: 123

Limit data in Flask Restless

how can I limit amout of rows/objects returning by calling an endpoint?

http://localhost:8111/api/food_order?q={"filters": 
[{"name":"user_id","op":"==","val":1188}, 
{"name":"date","op":">","val":"2018-05-01"}]}

I need only last 6 rows from this query. Thanks

Upvotes: 0

Views: 329

Answers (1)

empty lungs
empty lungs

Reputation: 123

well I figured that out. Hope that will help some1 :D

http://localhost:8111/api/food_order?q={"limit":6,"filters": 
[{"name":"user_id","op":"==","val":1188}, 
{"name":"date","op":">","val":"2018-05-01"}]}

so its simply "limit": 6 inside q param

Upvotes: 1

Related Questions