Thanks Richard, I hadn't thought about how the "just return links"
approach helps with caching.
For what I'm working on so far, I ended up going with returning the
entire resource because of situations like this:
/stores/1/transactions
A "use case" for our API would definitely be to list all the
transactions for a given store. If I just include the links, I'd have
one HTTP call to our API for each transaction! That wouldn't scale
well. Of course, that end point will also have defaults for "limit"
and "offset" query params. Also, our current POX API supports a
"transactions_list" call so I'd need a way to get a bundle of
resources back. I can see from a purely "navigating the api"
standpoint, that's way more data than is needed... but we're also
implementing the "fields" option so users can decide they just want a
subset of the resource returned to them.
So it could be /dogs?fields=name,id (assuming each dog resource also
has hypermedia links including "self" to get the full resource)
Just another approach to take.
I'm not sure it really matters, but we're also going to go with
"_links" using the HAL+json format for just the links part. Other than
that, it will be in a "dogs" parent node or <dogs><dog></dog><dog></
dog>...</dogs> in XML. The custom content type we'll use is the same
for a resource but with an extra "s" on the end to indicate a
collection. For partial responses, we append "_partial". Not sure if
that's standard or not, but it at least tells the client via media
type that it's not a full resource so some fields may not be there.