3 ms·
It was my understanding that representing foreign keys as URLs is a basic principle of REST. The URL is the canonical representation of the object in question.
by LogicHoleFlaw 17y ago
It was my understanding that representing foreign keys as URLs is a basic principle of REST. The URL is the canonical representation of the object in question. The URL is needed for all actions upon it, not just fetching.
- seldo 17y agoIf you're being strict about REST, you're absolutely right. But I have spent a lot of my career building REST APIs for people and from that I've learned that what most people mean when they say "RESTful" is "easy to use, and easy to read". Arguably including the foreign keys as URLs makes it easier to use, but I'm arguing that it's not :-)