If you think that consumers of the API would like to see the orders, embed them.
If you think that consumers would like to see an attribute like `total` for the order, embed it.
If you think that consumers would like to see some user_account information, embed it.
If you think that the total size of a collection is too big, paginate.
Tell your users that `X` may be embedded in `Y` and `Y` may be embedded in `Z`.
Write the code that consumes the API to expect the API to change.
HEATEOS is the constraint that matters in REST, all else is provided by the http spec etc.
If you want to paginate, use link realtions: http://www.iana.org/assignments/link-relations/link-relation...
If you want to describe a relationship, use a link relation.
Watch this: http://vimeo.com/20781278 Read this: http://shop.oreilly.com/product/0636920028468.do
If you think that consumers of the API would like to see the orders, embed them.
If you think that consumers would like to see an attribute like `total` for the order, embed it.
If you think that consumers would like to see some user_account information, embed it.
If you think that the total size of a collection is too big, paginate.
Tell your users that `X` may be embedded in `Y` and `Y` may be embedded in `Z`.
Write the code that consumes the API to expect the API to change.
HEATEOS is the constraint that matters in REST, all else is provided by the http spec etc.
If you want to paginate, use link realtions: http://www.iana.org/assignments/link-relations/link-relation...
If you want to describe a relationship, use a link relation.
Watch this: http://vimeo.com/20781278 Read this: http://shop.oreilly.com/product/0636920028468.do