Hacker News new | past | comments | ask | show | jobs | submit login

I have, I agree. However the common design patterns for REST APIs encourage canonical URIs for resources, and discourage the same resource being retrieved from multiple locations - which heterogenous collections inevitably lead to.

Perhaps I should have said discouraged in the common patterns for implementing REST and REST-like APIs.




I wholeheartedly disagree with you -- you're ignoring hypermedia, an essential component in proper REST architecture.

If one correctly leverages hypermedia, you may and most likely will have heterogenous responses and relations. Side-loading relevant relations is highly encouraged and is a core component of efficient API design.

To your credit, I believe most of the information out there about REST and REST-like APIs discount how much work actually goes into building a proper REST API with hypermedia -- so we will always have half-baked design patterns that solve problems when doing REST incorrectly.


I think you are both a bit of in nitpicking mode, right?

I think the easy and normal and common path is to have canonical uri for ressources, and to serve agregated content for convenience or speed on other entry points, while adding to agregated content pointers to canonical uris.

No?


We benefit from being pragmatic. thumbs up




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: