3 ms·
The pattern used in Rails would be something like api.test.com/teacher/1234/students
by albemuth 15y ago
The pattern used in Rails would be something like api.test.com/teacher/1234/students
- digitallimit0 15y agoI was just reading up on the Graph API Facebook uses and its pattern is just api.test.com/1234/students. There seems to be very little standardization. The tutorial I'm reading right now wants me to pass the id in as a parameter. Weird.
- mcantelon 15y agoFacebook's REST APIs seem pretty casually designed. "api.test.com/students/1234" is better URL design than "api.test.com/1234/students". You could then naturally guess to use "api.test.com/students" to get a list of students whereas with "api.test.com/1234/students" you'd end up having to do something weird like "api.test.com/all/students".