Filtering the data

37 views
Skip to first unread message

sushi...@orangebitsindia.com

unread,
Oct 3, 2016, 5:18:33 AM10/3/16
to RestExpress
Hi,

I'm new to REST web services but using this framework I've been able to build working REST api's.

The support I need is on filtering the data. For example, let's say I've 100 records of contacts but I'd like to retrieve one such contact which has phone number as 123456.

I've been using query parameters in URL like ?phonumber=123456 but it is not working.

Can someone please guide how can I filter the data given the parameters?

Thanks,
Sushil

sushi...@orangebitsindia.com

unread,
Oct 4, 2016, 7:04:34 AM10/4/16
to RestExpress
I figured it out by going through the code.

Please see example below

curl -i http://localhost:8587/users -H "phoneumber:=:123456"

Todd Fredrich

unread,
Jan 6, 2017, 7:56:58 PM1/6/17
to RestExpress
Thanks for posting Sushil,

You might also try the query string way such as

GET /users?Filter=phonenumber:=:123456789

Good luck,
Todd

Reply all
Reply to author
Forward
0 new messages