Answer the question
In order to leave comments, you need to log in
Are REST and passing multiple ids (WHERE IN queries) compatible?
I will describe a simple situation:
api/users - all users
api/users/5 - the fifth user
api/users/1,2,7,11,99 - select query by type where_in('user_id', $ids)
In the latter case, to to receive several users, it is enough for me to make only one request.
I would like to know if this approach has the right to life. Do I need to make 1 request or 5.
Answer the question
In order to leave comments, you need to log in
GET /api/users/ - all dudes
GET /api/users/?filter[id]=1,2,7,11,99 - filter for selecting all dudes
GET /api/users/5 - dude with ID 5
jsonapi .org
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question