There is no best way design for developing APIs for services, but your goals should be as clear and user-friendly as possible so that customers can pinpoint what the service is doing just by looking at the DTO request.
As a rule, services should be cohesive and relevant to use the context of the client context consuming them, for example, adding a new field / function for this request should potentially be useful for existing customers who already use this service.
Finding and filtering a result set is a good example of this, where each added field / function filters the target result set.
Other problems that arise when developing services are the ability to cache, that is, I separate the long-term results of caching from the short-term information that is not related to caching.
mythz source share