consider the following http request:
GET /defects?group-by=priority
I would like the returned collection (feed) of defects to be grouped by their priority. that is, the returned feed consists of defects (resources) and group information.
I thought of something that would return the names of the groups and count before returning the collection, for example:
<content>
<Group val="High" count="567"/>
<Group val="Medium" count="437"/>
<Group val="Low" count="19"/>
<Defect ,,,,>
<Defect ,,,,>
<Defect ,,,,>
</content>
The problem with this view is that the requested resource (URL) is a defect, so the client expects a collection of defects, not a Group element.
I think that one of the solutions to this problem would be to define a separate resource of groups for defects, namely:
defects/groups?group1=priority
, . , , \ .
, , ?
. , ATOM. ATOM , (XML, JSON), , RESTful.