Please help me to understand how to expose service in REST. Is it depends on RESOURCE or depends on the size of data ?
Example: Let we take 2 resources (STUDENT & DEPARTMENT). Now I have an requirement of exposing "Total number of Students" and "Total number of Departments".
How should I expose a service now ?
- Is it like exposing 2 different resource(api/student/total & api/department/total) ?
- Or can it be do like this(api/total/student,department) since the response data will be very minimal ?
Should we consider the response size when deciding about Resources ?