Assume that I have following model
Company -> Department -> Position -> Staff itself
For example: Apple Inc -> Account -> Officer -> staff list
Which propose should I use in api route:
/apple/account/officer
/apple?department=account&pos=officer
Both methods work (You need & in the second one)
The second however gives you flexibility for searching in the future (if that is something you will need)
Say, if you wanted to find all officers in different department, the second API allows you to do that, but the first approach requires a separate endpoint.