Let's say I have an endpoint for getting customers: /customers
with different modes in the request query. For example: /customers?mode={type}
, where type could be one of [employee, owner]
.
Let's say, I have different logic for getting either employee or owner(for example, for owners I return only firstName
and lastName
and for employees, I'm adding their passportId
(no matter what actually). Plus, there is a different set of permissions needed for accessing employee or owner.
The question is next: what's the logic limit for dividing GET request(for example /persons/employees
, /persons/owners
. Should I even do this?