1

I am developing rest web services in java with jersey library, my web services logic is all about events. like facebook events.

I am currently creating the webservices like this:

i have Get request for events where i return

id
name
end date
start date
description

and then if someone wants to have more information about that event like participants, places or media

i provide different web services based on the event id.

This forces someone that builds a front-end to have chained web service requests, because they need to know the event_id in order to ask about participants, places or media.

I was thinking of doing something like:

Get request for event web services and provide them with:

id
name
start date
end date 
description
participants - list of participants
media - list of media
places - list of places

Isn't this completely anti-pattern? because with Rest what is intended is to have different urls identifying specific resources, by doing the 2 option i am disrupting this concept right?

João
  • 331
  • 1
  • 3
  • 17
  • This question should be of some help to you: [REST Complex/Composite/Nested Resources](http://stackoverflow.com/questions/7104578/rest-complex-composite-nested-resources) – Romojr50 Jul 17 '14 at 17:38

0 Answers0