|
|
|
|
|
by nmcfarl
4568 days ago
|
|
Yeah - but what if it returned a collection of orders also retrievable from /orders/search?date=today and customers from /customers/search?lastorderdate=today&totallifteimevalue=greaterthan,100000 and support tickets from /support/tickets/search?state=open This kind of heterogeneous data tends to be very much discouraged under REST, but often very handy in producing real world reports. |
|
/dashboard?type=orders&type=customers&type=support
With either some documentation explaining the differences, or even the return value itself describing what's in e.g.
{"orders": {"date": "today", "data": [...]}, ... }
What you return depends entirely on the context of your web service. If people are telling you to always return a homogenous set of results then they're wrong. You know your application better than some random guy on the internet.